]> TLD Linux GIT Repositories - rc-scripts.git/blob - make-tag.sh
- disable lock checks (happens on LUKS2 and fails during system boot)
[rc-scripts.git] / make-tag.sh
1 #!/bin/sh
2 set -e
3 rev=$(git rev-parse HEAD)
4 last_tag=$(git tag -l | grep '^0' | sort -V | tail -n1)
5
6 if [ -n "$1" ]; then
7         tag="$1"
8 else
9         tag=$(awk -F, '/AC_INIT/{print $2}' configure.ac | tr -d '[ ]')
10 fi
11
12 cat <<EOF
13 Making tag: $tag at revision $rev
14
15 You probably want to fill git shortlog from last tag $last_tag as annotated tag message:
16
17   git shortlog $last_tag..HEAD
18
19 Press ENTER to continue, Ctrl+C to abort
20 EOF
21 read a
22
23 git tag -a "$tag" $rev
24
25 cat <<EOF
26
27 To push tag, execute:
28
29   git push origin "refs/tags/$tag"
30 EOF