Skip to content

Commit

Permalink
fix: change bump script to support non-master release
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Jun 4, 2020
1 parent 44faaf3 commit f350441
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/bump.sh
Expand Up @@ -2,14 +2,18 @@

set -euo pipefail

if [ "$#" -ne 1 ]; then
if [ "$#" -lt 1 ]; then
echo "You must provide the new version to the script. The current version is $(./scripts/version.sh vega-lite)."
exit 1
fi

if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then
echo "Not on master, please checkout master branch before running this script."
exit 1
if [ "$(git rev-parse --abbrev-ref HEAD)" != $2 ]; then
echo "Not on master, please checkout master branch before running this script or provide the branch name as the second parameter if you want to release from non-master branch."
exit 1
else
echo "Note: releasing from a non-master branch '$2'."
fi
fi

set -x
Expand Down

0 comments on commit f350441

Please sign in to comment.