diff options
author | Linus Nordberg <linus@nordu.net> | 2017-07-28 15:14:03 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2017-07-28 15:14:03 +0200 |
commit | 4223da5ae4d440774e350a8489b7d4bd0fe38c11 (patch) | |
tree | abf75b36f7b066f8dcf674fc8decb473c1585d15 /bump-tag | |
parent | 883c92a407ad1db7925eec9bab483b06d12aa5a7 (diff) |
Update from sunet/multiverse.ct-ops-2017-07-28-v01
Diffstat (limited to 'bump-tag')
-rwxr-xr-x | bump-tag | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -1,19 +1,30 @@ -#!/bin/sh +#!/bin/bash set -e test -f cosmos.conf && . ./cosmos.conf +echo "Fetching any updates from server:" git pull +echo "" -deftag=`basename $PWD` +if [ "x$1" = "x" ]; then + deftag=`basename $PWD` +else + deftag="$1" +fi tagpfx=${tag:="$deftag"} last_tag=`git tag -l "${tagpfx}-*"|sort|tail -1` -git tag -v $last_tag +echo "Verifying last tag $last_tag:" +(git tag -v $last_tag | grep ^gpg:) || true +# again to not mask exit status of git with grep +git tag -v $last_tag > /dev/null 2>&1 +echo "" -PAGER=cat git diff $last_tag..master +echo "Differences between tag $last_tag and what you are about to sign:" +PAGER=cat git diff --color $last_tag..master iter=1 ok= @@ -29,8 +40,13 @@ while test -z "$ok"; do esac done -echo using new tag $this_tag -echo ONLY SIGN IF YOU APPROVE OF VERIFICATION AND DIFF ABOVE +if [ "$deftag" != "$tagpfx" ]; then + echo -e "Using new tag \e[94m$this_tag\e[0m according to pattern in cosmos.conf" +else + echo -e "Using new tag \e[94m$this_tag\e[0m" +fi + +echo -e "\e[1mONLY SIGN IF YOU APPROVE OF VERIFICATION AND DIFF ABOVE\e[0m" # GITTAGEXTRA is for putting things like "-u 2117364A" |