From 561e47ac5e6d458daf2a6e52e5a83daecca38b92 Mon Sep 17 00:00:00 2001 From: abdfnx Date: Fri, 4 Feb 2022 15:13:54 +0300 Subject: [PATCH] add `scripts/tag.sh` script file --- scripts/tag.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 scripts/tag.sh diff --git a/scripts/tag.sh b/scripts/tag.sh new file mode 100644 index 0000000..a9224c4 --- /dev/null +++ b/scripts/tag.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +tag="${1}" + +while (($#)); do + case "$2" in + + -a) + git tag -a "${tag}" -m "" + exit 0 + ;; + + -p) + git push origin "${tag}" + exit 0 + ;; + + -x) + git tag -a "${tag}" -m "" + git push origin "${tag}" + exit 0 + ;; + + -d) + git tag -d "${tag}" + git push --delete origin "${tag}" + exit 0 + ;; + + esac +done