Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- current_branch=$(git rev-parse --abbrev-ref HEAD)
- branches=( "master" "target/cloud" "target/stage" "target/hybrid" )
- exec < /dev/tty
- for branch in "${branches[@]}"
- do
- if [ $current_branch == $branch ]; then
- echo "Have you modified the version number? (y/n) "
- read -p "> " confirmation
- if [ $confirmation != "y" ]; then
- echo "Aborting push"
- exit 1
- fi
- echo "Pushing to $current_branch"
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement