Created
December 14, 2018 10:35
-
-
Save octavian-nita/8134662f0a00c9e880ac5b3b5e91546a 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
#!/usr/bin/env bash | |
# Consider writing robust bash shell scripts ( http://mywiki.wooledge.org/ ;) | |
set -o nounset | |
# ---------------------- | |
# Command line arguments | |
# ---------------------- | |
[[ $# -ge 1 ]] || { printf "\nusage:\n\t`basename ${BASH_SOURCE}` <tag-name-1> <tag-name-2> ...\n" 1>&2; return 1; } | |
declare -a TAG_NAMES=( "$@" ) | |
# ---- | |
# Main | |
# ---- | |
for T in ${TAG_NAMES[*]}; do | |
# locally | |
git tag --delete "${T}" | |
# remotely | |
git push --delete origin "${T}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment