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
6
6
# It will create a tag and push it, which will trigger CI to create a release,
7
7
# build release binaries, push them to the release, and publish a new version on NPM
8
8
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
+
9
17
NEW_TAG=$( ./scripts/get-version)
10
18
11
19
# Fail if the new tag already exists
20
+ # Note: exit status of the command is the conditional
12
21
if 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 " ;
14
23
exit 1;
15
24
fi
16
25
@@ -20,4 +29,4 @@ git tag "${NEW_TAG}"
20
29
21
30
git push origin " ${NEW_TAG} "
22
31
23
- echo " Done."
32
+ echo " Done."
You can’t perform that action at this time.
0 commit comments