Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Commit

Permalink
Revert "ci(circle): Remove loop in bash release script"
Browse files Browse the repository at this point in the history
This reverts commit ed058cb.

Issue #81 has probably been caused by CircleCI feature called "auto-cancel
redundant builds". When release script pushed a new commit to master branch build was cancelled, because default branch
for this repository is `develop`, and builds are not cancelled
automatically with this feature only for default branches.
  • Loading branch information
k911 committed Nov 30, 2019
1 parent ed058cb commit a468ef7
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .circleci/release-version.sh
Expand Up @@ -116,15 +116,18 @@ else
fi

# Push commit and tag

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
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

# Make github release
GH_RELEASE_DRAFT="${GH_RELEASE_DRAFT:-false}"
Expand Down

0 comments on commit a468ef7

Please sign in to comment.