Skip to content

Commit

Permalink
Merge pull request #274 from SRandazzo/patch-1
Browse files Browse the repository at this point in the history
Update CI instructions in Readme
  • Loading branch information
ds300 committed Mar 17, 2021
2 parents 542eea4 + ec161c4 commit 5c2c92b
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,29 @@ details.
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
Create a hash of your patches before loading/saving your cache. If using a Linux machine, run `md5sum patches/* > patches.hash`. If running on a macOS machine, use `md5 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" }}
```

As well as the save_cache
```yaml
- save_cache:
key: app-node_modules-v1-{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}
paths:
- ./node_modules
```


## Usage

Expand Down

0 comments on commit 5c2c92b

Please sign in to comment.