Skip to content

Instantly share code, notes, and snippets.

@kikoso
Last active September 3, 2019 11:01
Show Gist options
  • Save kikoso/54d33525fa4e70c916ef7475b9c52007 to your computer and use it in GitHub Desktop.
Save kikoso/54d33525fa4e70c916ef7475b9c52007 to your computer and use it in GitHub Desktop.
#!/bin/sh
name_of_branch=$(git branch | grep "*" | sed "s/\* //")
if [[ $name_of_branch == "master" ]]; then
read -p "Branch successfully merged on master. Please, specify tag version and click enter: " version
echo Creating tag with version "$version"
git tag -a v$version -m "$version"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment