Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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