Created
April 4, 2019 15:23
-
-
Save bitmvr/61cccda5a54fe6cdf4d669c0c0c19d38 to your computer and use it in GitHub Desktop.
Tag Erasing Apparatus (TEA) - Quickly remove git tags locally and remotely.
This file contains 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 | |
# TEA: Tag Erasing Apparatus | |
tag=$1 | |
function delete_local_tag() { | |
git tag -d "${tag}" | |
} | |
function delete_remote_tag() { | |
git push --delete origin "${tag}" | |
} | |
function successful_operation() { | |
if [ $? -eq 0 ]; then | |
echo "${1}" | |
fi | |
} | |
delete_local_tag | |
successful_operation("Local Tag Removed") | |
delete_remote_tag | |
successful_operation("Remote Tag Removed") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment