File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,20 @@ set -euo pipefail
66# It will create a tag and push it, which will trigger CI to create a release,
77# build release binaries, push them to the release, and publish a new version on NPM
88
9+ # Fail if we are not on trunk
10+ BRANCH=$( git branch --show-current)
11+ if [ " ${BRANCH} " != " master" ]; then
12+ echo " Please checkout master branch"
13+ exit 1;
14+ fi
15+ git pull
16+
917NEW_TAG=$( ./scripts/get-version)
1018
1119# Fail if the new tag already exists
20+ # Note: exit status of the command is the conditional
1221if git rev-parse " ${NEW_TAG} " > /dev/null 2>&1 ; then
13- echo " Tag '${NEW_TAG} ' already exists, please bump the version in package.yaml " ;
22+ echo " Tag '${NEW_TAG} ' already exists, please bump the version in spago.cabal " ;
1423 exit 1;
1524fi
1625
@@ -20,4 +29,4 @@ git tag "${NEW_TAG}"
2029
2130git push origin " ${NEW_TAG} "
2231
23- echo " Done."
32+ echo " Done."
You can’t perform that action at this time.
0 commit comments