From 42a5a774ef093e1ebbe4df290405900c7debe7af Mon Sep 17 00:00:00 2001 From: Guillaume Tucker <guillaume.tucker@collabora.com> Date: Thu, 29 Nov 2018 19:01:18 +0000 Subject: [PATCH] HACK add tag.sh to create kernelci-local-snapshot-xxx tags Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> --- tag.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 tag.sh diff --git a/tag.sh b/tag.sh new file mode 100755 index 000000000000..3006a2dca9cf --- /dev/null +++ b/tag.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +px=kernelci-local-snapshot- +last_tag=$(git tag -l | grep $px | sort | tail -n 1) +n=$(echo $last_tag | awk '{print substr($0,25)}') +n="10#$n" +let 'n=n+1' +m=`printf "%03d" $n` +new_tag="$px""$m" +today=`date +%Y-%m-%d` +msg="KernelCI local snapshot #$m $today" +git tag -a "$new_tag" -m "$msg" +echo "$new_tag" + +exit 0 -- GitLab