Skip to content

Commit 5c2c92b

Browse files
authored
Merge pull request #274 from SRandazzo/patch-1
Update CI instructions in Readme
2 parents 542eea4 + ec161c4 commit 5c2c92b

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

README.md

+23-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,29 @@ details.
7878
Otherwise if you update a patch then the change may not be reflected on
7979
subsequent CI runs.
8080

81-
E.g., for CircleCI: before loading/saving your cache run
82-
`cat patches/* | md5 > patches.hash` and then update your hash key to include
83-
a checksum of that file,
84-
`{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}`.
81+
82+
### CircleCI
83+
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`
84+
```yaml
85+
- run:
86+
name: patch-package hash
87+
command: md5sum patches/* > patches.hash
88+
```
89+
90+
Then, update your hash key to include a checksum of that file:
91+
```yaml
92+
- restore_cache:
93+
key: app-node_modules-v1-{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}
94+
```
95+
96+
As well as the save_cache
97+
```yaml
98+
- save_cache:
99+
key: app-node_modules-v1-{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}
100+
paths:
101+
- ./node_modules
102+
```
103+
85104
86105
## Usage
87106

0 commit comments

Comments
 (0)