Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. VERSION="$1"
  4.  
  5. if [ -z "$VERSION" ];then
  6. echo "Version argument is mandantory" >&2
  7. exit 1
  8. fi
  9.  
  10. if expr "$VERSION" : "^v[0-9]\+\.[0-9]\+\.[0-9]\+" >/dev/null;then
  11. git commit --allow-empty -m "$VERSION"
  12. git tag $VERSION
  13. else
  14. echo "Not a valid version" >&2
  15. exit 2
  16. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement