]> git.pld-linux.org Git - projects/geninitrd.git/blob - make-tag.sh
Timeout here is not a good idea. rootfs cannot be mounted and kernel oopses due to...
[projects/geninitrd.git] / make-tag.sh
1 #!/bin/sh
2 set -e
3 rev=$(git rev-parse HEAD)
4 ref=$(git for-each-ref 'refs/tags' --format='%(refname)' --sort=taggerdate | tail -n1)
5 last_tag=${ref#refs/tags/}
6
7 if [ -n "$1" ]; then
8         tag="$1"
9 else
10         ifs=$IFS; IFS=-
11         set -- $(git describe --tags)
12         IFS=$ifs
13         tag=$(($1 + $2))
14 fi
15
16 cat <<EOF
17 Making tag: $tag at revision $rev
18
19 You probably want to fill git shortlog from last tag $last_tag as annotated tag message:
20
21   git shortlog $last_tag..HEAD
22
23 Press ENTER to continue, Ctrl+C to abort
24 EOF
25 read a
26
27 git tag -a "$tag" $rev
28
29 cat <<EOF
30
31 To push tag, execute:
32
33   git push origin "refs/tags/$tag"
34 EOF
This page took 0.039901 seconds and 3 git commands to generate.