ds300 / patch-package

Fix broken node modules instantly 🏃🏽‍♀️💨
MIT License
10.46k stars 295 forks source link

Readme recommendation about CircleCI appears incorrect #273

Open vdh opened 4 years ago

vdh commented 4 years ago

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" }}.

This recommendation is either outdated or incorrect, because md5 appears to be not available in CircleCi:

#!/bin/bash -eo pipefail
cat patches/* | md5 > patches.hash
/bin/bash: md5: command not found

Exited with code exit status 127
CircleCI received exit code 127
vdh commented 4 years ago

It looks like the correct command for CircleCI would be something like md5sum patches/* > patches.hash

SRandazzo commented 4 years ago

md5sum patches/* > patches.hash as suggested above worked for me on CircleCI Thanks!

SRandazzo commented 4 years ago

@vdh I've taken your recommendation and updated docs in a PR here: https://github.com/ds300/patch-package/pull/274

thanks again for the help

SRandazzo commented 4 years ago

I've further clarified in my PR when to use md5 vs md5sum

 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`