]> git.pld-linux.org Git - projects/geninitrd.git/blob - make-tag.sh
help tag making with git shortlog hint
[projects/geninitrd.git] / make-tag.sh
1 #!/bin/sh
2 set -e
3 rev=$(git rev-parse HEAD)
4 last_tag=$(git tag -l | grep -E '^[0-9]+' | sort -V | tail -n1)
5
6 if [ -n "$1" ]; then
7         tag="$1"
8 else
9         ifs=$IFS; IFS=-
10         set -- $(git describe --tags)
11         IFS=$ifs
12         tag=$(($1 + $2))
13 fi
14
15 cat <<EOF
16 Making tag: $tag at revision $rev
17
18 You probably want to fill git shortlog from last tag $last_tag as annotated tag message:
19
20   git shortlog $last_tag..HEAD
21
22 Press ENTER to continue, Ctrl+C to abort
23 EOF
24 read a
25
26 git tag -a "$tag" $rev
27
28 cat <<EOF
29
30 To push tag, execute:
31
32   git push origin "refs/tags/$tag"
33 EOF
This page took 0.120893 seconds and 3 git commands to generate.