]> git.pld-linux.org Git - projects/rc-scripts.git/blame - make-tag.sh
Don't fail if arrays are already assembled (ex raid10 with 4 devices, one device...
[projects/rc-scripts.git] / make-tag.sh
CommitLineData
893b9510 1#!/bin/sh
04d62a7e
KK
2set -e
3rev=$(git rev-parse HEAD)
42167d39 4last_tag=$(git tag -l | grep '^0' | sort -V | tail -n1)
893b9510 5
42167d39
ER
6if [ -n "$1" ]; then
7 tag="$1"
8else
9 tag=$(awk -F, '/AC_INIT/{print $2}' configure.ac | tr -d '[ ]')
10fi
893b9510 11
42167d39
ER
12cat <<EOF
13Making tag: $tag at revision $rev
14
15You probably want to fill git shortlog from last tag $last_tag as annotated tag message:
16
17 git shortlog $last_tag..HEAD
18
19Press ENTER to continue, Ctrl+C to abort
20EOF
893b9510
ER
21read a
22
04d62a7e 23git tag -a "$tag" $rev
42167d39
ER
24
25cat <<EOF
26
27To push tag, execute:
28
29 git push origin "refs/tags/$tag"
30EOF
This page took 1.047032 seconds and 4 git commands to generate.