From ae356734898704b67584212ceec8f060b0160a60 Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 16 Jan 2020 15:39:44 -0600 Subject: [PATCH] Use custom Yarn cache directory Makes it easier to upload and restore. --- scripts/cacher.sh | 2 +- scripts/ci.bash | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/cacher.sh b/scripts/cacher.sh index 38b1a172..0ee1bc58 100755 --- a/scripts/cacher.sh +++ b/scripts/cacher.sh @@ -23,7 +23,7 @@ restore() { # the cache-upload directory will be uploaded as-is to the code-server bucket. package() { mkdir -p "cache-upload/cache/$1" - tar czfv "cache-upload/cache/$1/$tar.tar.gz" node_modules source /usr/local/share/.cache/yarn + tar czfv "cache-upload/cache/$1/$tar.tar.gz" node_modules source yarn-cache } main() { diff --git a/scripts/ci.bash b/scripts/ci.bash index 77fe12b4..857c38b0 100755 --- a/scripts/ci.bash +++ b/scripts/ci.bash @@ -21,6 +21,9 @@ function main() { mv "vscode-$vscode_version-source" "source/vscode-$vscode_version-source" fi + YARN_CACHE_FOLDER="$(pwd)/yarn-cache" + export YARN_CACHE_FOLDER + # Always minify and package on tags since that's when releases are pushed. if [[ -n ${DRONE_TAG:-} || -n ${TRAVIS_TAG:-} ]] ; then export MINIFY="true"