aboutsummaryrefslogtreecommitdiffstats
path: root/.circleci
diff options
context:
space:
mode:
authorBruno Barbieri <bruno.barbieri@consensys.net>2018-07-07 03:26:06 +0800
committerGitHub <noreply@github.com>2018-07-07 03:26:06 +0800
commitaf04ca59e9f24892f2e0cf1a783feedd9e88ad06 (patch)
treec8a18bc2cc4baca52afeadab8ee307b2b09bd1b8 /.circleci
parentd9c78fc6458b9fcdf02ddf2ecdbfcc3837f2e65f (diff)
downloadtangerine-wallet-browser-af04ca59e9f24892f2e0cf1a783feedd9e88ad06.tar
tangerine-wallet-browser-af04ca59e9f24892f2e0cf1a783feedd9e88ad06.tar.gz
tangerine-wallet-browser-af04ca59e9f24892f2e0cf1a783feedd9e88ad06.tar.bz2
tangerine-wallet-browser-af04ca59e9f24892f2e0cf1a783feedd9e88ad06.tar.lz
tangerine-wallet-browser-af04ca59e9f24892f2e0cf1a783feedd9e88ad06.tar.xz
tangerine-wallet-browser-af04ca59e9f24892f2e0cf1a783feedd9e88ad06.tar.zst
tangerine-wallet-browser-af04ca59e9f24892f2e0cf1a783feedd9e88ad06.zip
Run npm install only when needed
Diffstat (limited to '.circleci')
-rw-r--r--.circleci/config.yml5
1 files changed, 4 insertions, 1 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 63f6a64b1..e41b919fa 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -108,7 +108,10 @@ jobs:
- run:
name: Install deps via npm
command: |
- sudo npm install -g npm@6
+ # Only run npm install if the package-lock.json or package.json was changed
+ CHANGED_FILES="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
+ echo "$CHANGED_FILES" | grep --quiet "package.*json" &&
+ sudo npm install -g npm@6 &&
npm install
- save_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}