From 2ed7ceb59d19860ad320660df5863f53b36dd2f3 Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Thu, 11 Jul 2019 13:23:17 +0200 Subject: [PATCH] Use packages cache, run lern via npx --- .circleci/config.yml | 6 ++---- scripts/circle-check-packages.sh | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 112719ba896..e4abe59217a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -628,10 +628,8 @@ jobs: - image: circleci/node:10 steps: - checkout - - run: - name: yarn add lerna - command: 'yarn add -W lerna' - no_output_timeout: 15m + - restore_cache: + key: dependency-cache-{{ checksum "yarn.lock" }} - run: name: prepare bumped versions command: './scripts/circle-check-packages.sh' diff --git a/scripts/circle-check-packages.sh b/scripts/circle-check-packages.sh index 13ea78b1898..db7aa1ae4ca 100755 --- a/scripts/circle-check-packages.sh +++ b/scripts/circle-check-packages.sh @@ -13,14 +13,14 @@ echo "Commit: ${GIT_BRANCH}" echo "Current lerna.json version: ${PACKAGE_VERSION}" # count packages that changed -count=`./node_modules/.bin/lerna changed --loglevel silent | awk '{c++} END {print c}'` +count=`npx lerna changed --loglevel silent | awk '{c++} END {print c}'` if [ -z $count ]; then - echo "No changes in packages, not publishing" + echo "No changes in packages, skipping packages publishing" else echo "Changes detected in ${count} packages" echo "Releasing packages under ${PACKAGE_VERSION}-${GIT_BRANCH}" - lerna version ${PACKAGE_VERSION}-${GIT_BRANCH} --no-git-tag-version --no-push --force-publish -y + npx lerna version ${PACKAGE_VERSION}-${GIT_BRANCH} --no-git-tag-version --no-push --force-publish -y git status -s fi