Commit 179d58f5 authored by Ed Morley's avatar Ed Morley

Add $STACK to the cache signature

To ensure that the cache is busted when apps update to a new stack.

Fixes #445.
parent da19bdb7
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
## Master ## Master
- Add `$STACK` to the cache signature (#445)
## v106 (2017-06-19) ## v106 (2017-06-19)
- Default to npm v5 if `package-lock.json` is present (#429) - Default to npm v5 if `package-lock.json` is present (#429)
......
source $BP_DIR/lib/binaries.sh source $BP_DIR/lib/binaries.sh
create_signature() { create_signature() {
echo "$(node --version); $(npm --version); $(yarn --version 2>/dev/null || true) $PREBUILD" echo "${STACK}; $(node --version); $(npm --version); $(yarn --version 2>/dev/null || true); ${PREBUILD}"
} }
save_signature() { save_signature() {
......
...@@ -60,6 +60,7 @@ testBuildWithCache() { ...@@ -60,6 +60,7 @@ testBuildWithCache() {
compile "stable-node" $cache compile "stable-node" $cache
assertNotCaptured "- node_modules (not cached - skipping)" assertNotCaptured "- node_modules (not cached - skipping)"
assertFileContains "${STACK}" "${cache}/node/signature"
assertCapturedSuccess assertCapturedSuccess
rm -rf "$cache/node/node_modules" rm -rf "$cache/node/node_modules"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment