From 37554aa68a8faa9d0b385e22bb343a0d6d29ec07 Mon Sep 17 00:00:00 2001 From: Rob Hogan <2590098+robhogan@users.noreply.github.com> Date: Wed, 20 Sep 2023 15:37:34 +0100 Subject: [PATCH] Update config.yml --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d6ad887c22..e697748c28 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -113,12 +113,15 @@ jobs: - run: name: Publish based on tag conditions command: | - env # Reduce a semver tag name to a Metro's release branch naming convention, eg v0.1.2-alpha.3 -> 0.1.x RELEASE_BRANCH=$(echo "$CIRCLE_TAG" | awk -F. '{print substr($1, 2) "." $2 ".x"}') echo "Release branch: $RELEASE_BRANCH" # Does a release branch contain this tag (hotfix workflow) (0 or 1) + echo "Here1" + echo "$CIRCLE_TAG $RELEASE_BRANCH" + git branch -a --contains "$CIRCLE_TAG" | grep -Fx " remotes/origin/$RELEASE_BRANCH" | wc -l TAG_ON_RELEASE_BRANCH=$(git branch -a --contains "$CIRCLE_TAG" | grep -Fx " remotes/origin/$RELEASE_BRANCH" | wc -l) + echo "Here2" echo "Tag is on release branch $RELEASE_BRANCH: $TAG_ON_RELEASE_BRANCH" # Does main contain this tag (0 or 1) TAG_ON_MAIN=$(git branch -a --contains "$CIRCLE_TAG" | grep -Fx ' remotes/origin/main' | wc -l)