passepartout-apple/scripts/ci/tag-release.sh

19 lines
351 B
Bash
Raw Normal View History

#!/bin/bash
CURRENT_BRANCH=`git branch --show-current`
2021-11-16 11:01:54 +00:00
if [[ $CURRENT_BRANCH != "master" ]]; then
echo "Not on master branch"
exit 1
fi
VERSION=$1
if [[ -z $VERSION ]]; then
echo "Must provide version"
exit 1
fi
2021-11-16 11:01:54 +00:00
TAG_MESSAGE="Release"
2021-10-06 11:22:45 +00:00
if ! git tag -a "v$VERSION" -m "$TAG_MESSAGE"; then
2021-10-06 11:22:45 +00:00
echo "Failed to tag release"
exit 1
2021-10-06 11:22:45 +00:00
fi