diff options
Diffstat (limited to 'bin/git-upstream-tag')
-rwxr-xr-x | bin/git-upstream-tag | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/git-upstream-tag b/bin/git-upstream-tag new file mode 100755 index 0000000..dd049d9 --- /dev/null +++ b/bin/git-upstream-tag @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +if [ -n "$(git config --get user.signingKey)" ] +then + GIT_OPTIONS="-s" +else + GIT_OPTIONS="-a" +fi + +VERSION="${1}" +COMMIT="${2}" + +TAG="$(echo ${VERSION} | sed -e 's|:|%|g' -e 's|~|_|g')" + +git tag ${GIT_OPTIONS} -f -m "Tagging upstream version ${VERSION}." upstream/${TAG} ${COMMIT} |