Guest User

Untitled

a guest
Jan 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #!/bin/sh
  2. echo "Last tag is:"
  3. git tag | sed -e '$!d'
  4. echo "Want to tag current commit? type the name of the tag (leave empty to skip)"
  5. read current
  6. if [ "$current" != "" ]; then
  7. git tag -a $current
  8. fi
  9.  
  10. echo "Type the name of the tag you want to move (leave blank to skip)"
  11. read movement
  12. if [ "$current" != "" ]; then
  13. git tag -af $movement
  14. fi
  15.  
  16. read -p "Want to push all updated tags? (y/N)" -n 1 -r
  17. echo # (optional) move to a new line
  18. if [[ $REPLY =~ ^[Yy]$ ]]; then
  19. git push origin :$movement
  20. git push --tags
  21. fi
  22.  
  23.  
  24. echo "Done!"
Add Comment
Please, Sign In to add comment