Created
November 20, 2019 12:12
-
-
Save jberndsen/f7bdf8ce7ac5811a80675835351f3188 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
CURRENT_BRANCH=$(git branch | grep \* | cut -d ' ' -f2) | |
if [[ "$CURRENT_BRANCH" == "develop" ]] | |
then | |
git pull | |
REL=$(npm --no-git-tag-version version minor | sed 's/^v//') | |
git checkout -b release/$REL | |
git add package.json package-lock.json | |
git commit -m'release branch created' | |
git push --set-upstream origin release/$REL | |
else | |
echo " ! can create from 'develop' branch only ! " | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment