From ceaa30d88e3b6a6393eb6ad51bdeeee4390fee65 Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Fri, 12 Jul 2019 13:19:29 +0200 Subject: [PATCH] Rename job and run it after frontend tests and build passes --- .circleci/config.yml | 14 +++++++++++--- ...packages.sh => circle-release-next-packages.sh} | 8 ++++---- 2 files changed, 15 insertions(+), 7 deletions(-) rename scripts/{circle-check-packages.sh => circle-release-next-packages.sh} (80%) diff --git a/.circleci/config.yml b/.circleci/config.yml index bca0f2c81f4..8bd2f56b03b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,6 +13,11 @@ aliases: - &filter-only-master branches: only: master + - &filter-not-release-but-master + tags: + ignore: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ + branches: + only: master version: 2 @@ -623,7 +628,7 @@ jobs: echo "-- no changes to docs files --" fi - release-packages-nightly: + release-next-packages: docker: - image: circleci/node:10 steps: @@ -636,7 +641,7 @@ jobs: command: 'echo //registry.npmjs.org/:_authToken=$NPM_TOKEN >> ~/.npmrc' - run: name: prepare bumped versions - command: './scripts/circle-check-packages.sh' + command: './scripts/circle-release-next-packages.sh' workflows: version: 2 @@ -818,6 +823,9 @@ workflows: - postgres-integration-test - cache-server-test filters: *filter-not-release-or-master - - release-packages-nightly: + - release-next-packages: + requires: + - test-frontend + - build-fast-frontend filters: *filter-not-release-or-master diff --git a/scripts/circle-check-packages.sh b/scripts/circle-release-next-packages.sh similarity index 80% rename from scripts/circle-check-packages.sh rename to scripts/circle-release-next-packages.sh index efb61337c33..0ab200ef4b3 100755 --- a/scripts/circle-check-packages.sh +++ b/scripts/circle-release-next-packages.sh @@ -14,9 +14,9 @@ function prapare_version_commit () { #Get current version from lerna.json PACKAGE_VERSION=`grep '"version"' lerna.json | cut -d '"' -f 4` # Get short current commit's has -GIT_BRANCH=$(parse_git_hash) +GIT_SHA=$(parse_git_hash) -echo "Commit: ${GIT_BRANCH}" +echo "Commit: ${GIT_SHA}" echo "Current lerna.json version: ${PACKAGE_VERSION}" # count packages that changed @@ -26,8 +26,8 @@ if [ -z $count ]; then echo "No changes in packages, skipping packages publishing" else echo "Changes detected in ${count} packages" - echo "Releasing packages under ${PACKAGE_VERSION}-${GIT_BRANCH}" - npx lerna version ${PACKAGE_VERSION}-${GIT_BRANCH} --no-git-tag-version --no-push --force-publish -y + echo "Releasing packages under ${PACKAGE_VERSION}-${GIT_SHA}" + npx lerna version ${PACKAGE_VERSION}-${GIT_SHA} --no-git-tag-version --no-push --force-publish -y echo $'\nGit status:' git status -s