Skip to content

Commit a99fe0f

Browse files
authored
Merge pull request #208 from harriha/patch-1
README: Update and add tips about usage in Docker and CI
2 parents a160fb3 + 3b38e64 commit a99fe0f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,21 @@ need to repeat the setup process for the child package. Also make sure you're in
5959
the child package directory when you run `patch-package` to generate the patch
6060
files.
6161

62-
### CI
62+
### Docker and CI
6363

64-
- Gitlab Docker builds, see
65-
[#185](https://github.com/ds300/patch-package/issues/185)
64+
- If having errors about working directory ("cannot run in wd [...]") when
65+
building in Docker, you might need to adjust configuration in `.npmrc`. See
66+
[#185](https://github.com/ds300/patch-package/issues/185).
67+
- In your `Dockerfile`, remember to copy over the patch files *before* running
68+
`[npm|yarn] install`
6669
- If you cache `node_modules` rather than running `yarn install` every time,
6770
make sure that the `patches` dir is included in your cache key somehow.
6871
Otherwise if you update a patch then the change may not be reflected on
6972
subsequent CI runs.
7073

71-
e.g. for cirlce ci before loading/saving you 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" }}`
74+
E.g., for CircleCI: before loading/saving your cache run `cat patches/* | md5 > patches.hash`
75+
and then update your hash key to include a checksum of that file,
76+
`{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}`.
7277

7378

7479
## Usage

0 commit comments

Comments
 (0)