From ed058cbab947a455c4324a867f078d755bd423bd Mon Sep 17 00:00:00 2001 From: k911 Date: Sat, 30 Nov 2019 14:12:37 +0100 Subject: [PATCH] ci(circle): Remove loop in bash release script Motivation: trying to fix circleci job failure (see #81) --- .circleci/release-version.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.circleci/release-version.sh b/.circleci/release-version.sh index 67e545a7..e232f62f 100755 --- a/.circleci/release-version.sh +++ b/.circleci/release-version.sh @@ -116,18 +116,15 @@ else fi # Push commit and tag -GH_TOKEN="${GH_TOKEN:?"Provide \"GH_TOKEN\" variable with GitHub Personal Access Token"}" -REVS="$RELEASE_TAG HEAD:master HEAD:develop" - -git remote add authorized "https://${GH_COMMITER_NAME}:${GH_TOKEN}@github.com/${GH_REPOSITORY}.git" -for REV in $REVS; do - if [ "0" = "$DRY_RUN" ]; then - git push authorized "$REV" - else - echo "Pushing $REV.." - fi -done -git remote remove authorized + +if [ "0" = "$DRY_RUN" ]; then + GH_TOKEN="${GH_TOKEN:?"Provide \"GH_TOKEN\" variable with GitHub Personal Access Token"}" + git remote add authorized "https://${GH_COMMITER_NAME}:${GH_TOKEN}@github.com/${GH_REPOSITORY}.git" + git push authorized "$RELEASE_TAG" + git push authorized HEAD:master + git push authorized HEAD:develop + git remote remove authorized +fi # Make github release GH_RELEASE_DRAFT="${GH_RELEASE_DRAFT:-false}"