Skip to content

Commit

Permalink
Update CI instructions in Readme
Browse files Browse the repository at this point in the history
Updates instructions/example for CI/CircleCI to be clearer.
Takes recommendation from: #273 to fix md5 not working on CircleCI
  • Loading branch information
SRandazzo authored Oct 27, 2020
1 parent 50f73bd commit 5a5dbd2
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,19 @@ For `patch-package` to work on Heroku applications, you must specify [`NPM_CONFI
Otherwise if you update a patch then the change may not be reflected on
subsequent CI runs.

E.g., for CircleCI: before loading/saving your cache run `cat patches/* | md5 > patches.hash`
and then update your hash key to include a checksum of that file,
`{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}`.
#### CircleCI example
Before loading/saving your cache, run `md5sum patches/* > patches.hash`
```yaml
- run:
name: patch-package hash
command: md5sum patches/* > patches.hash
```
Then, update your hash key to include a checksum of that file:
```yaml
- restore_cache:
key: app-node_modules-v1-{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}
```
## Usage
Expand Down

0 comments on commit 5a5dbd2

Please sign in to comment.