Skip to content

Commit 5a5dbd2

Browse files
authored
Update CI instructions in Readme
Updates instructions/example for CI/CircleCI to be clearer. Takes recommendation from: #273 to fix md5 not working on CircleCI
1 parent 50f73bd commit 5a5dbd2

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,19 @@ For `patch-package` to work on Heroku applications, you must specify [`NPM_CONFI
7575
Otherwise if you update a patch then the change may not be reflected on
7676
subsequent CI runs.
7777

78-
E.g., for CircleCI: before loading/saving your cache run `cat patches/* | md5 > patches.hash`
79-
and then update your hash key to include a checksum of that file,
80-
`{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}`.
78+
#### CircleCI example
79+
Before loading/saving your cache, run `md5sum patches/* > patches.hash`
80+
```yaml
81+
- run:
82+
name: patch-package hash
83+
command: md5sum patches/* > patches.hash
84+
```
8185
86+
Then, update your hash key to include a checksum of that file:
87+
```yaml
88+
- restore_cache:
89+
key: app-node_modules-v1-{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}
90+
```
8291
8392
## Usage
8493

0 commit comments

Comments
 (0)