]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
update make tag helper from geninitrd
authorElan Ruusamäe <glen@delfi.ee>
Mon, 7 Jul 2014 15:36:39 +0000 (18:36 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 7 Jul 2014 15:36:39 +0000 (18:36 +0300)
make-tag.sh

index dafbed8e83c681f9a3ed955f4ae7e37b7c22e568..2ad825dfe7524a1d15504dabd1a8e1c5f059d01a 100755 (executable)
@@ -1,14 +1,30 @@
 #!/bin/sh
 set -e
 rev=$(git rev-parse HEAD)
+last_tag=$(git tag -l | grep '^0' | sort -V | tail -n1)
 
-version=$(awk -F, '/AC_INIT/{print $2}' configure.ac | tr -d '[ ]')
-tag="$version"
+if [ -n "$1" ]; then
+       tag="$1"
+else
+       tag=$(awk -F, '/AC_INIT/{print $2}' configure.ac | tr -d '[ ]')
+fi
 
-echo "Making tag: $tag at revision $rev"
-echo ""
-echo "Press ENTER to continue..."
+cat <<EOF
+Making tag: $tag at revision $rev
+
+You probably want to fill git shortlog from last tag $last_tag as annotated tag message:
+
+  git shortlog $last_tag..HEAD
+
+Press ENTER to continue, Ctrl+C to abort
+EOF
 read a
 
 git tag -a "$tag" $rev
-git push origin "refs/tags/$tag"
+
+cat <<EOF
+
+To push tag, execute:
+
+  git push origin "refs/tags/$tag"
+EOF
This page took 0.05409 seconds and 4 git commands to generate.