aboutsummaryrefslogtreecommitdiffstats
path: root/tag_damon_next.sh
blob: 2a8374d08a27c75be2af41df2a7c43d41e5d2b5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

if [ $# -lt 1 ] || [ $# -gt 2 ]
then
	echo "Usage: $0 <baseline> [--push]"
	echo "    e.g., $0 v5.19-rc1-mm-unstable --push"
	exit 1
fi

baseline=$1

if [ $# -eq 2 ] && [ "$2" = "--push" ]
then
	push="true"
else
	push="false"
fi

echo "ensure gpg password"
bindir=$(dirname "$0")
"$bindir/ensure_gpg_password.sh"

datetime=$(date +"%Y-%m-%d-%H-%M")
tagname=damon/next-$datetime-on-$baseline
echo "tagging as $tagname"
git tag -as "$tagname" -m "A snapshot of damon/next"

if [ ! "$push" = "true" ]
then
	exit 0
fi

echo "push"
"$bindir/_push_tag.sh" "$tagname"