]> git.pld-linux.org Git - projects/rc-scripts.git/blobdiff - make-tag.sh
makefile: add AM_DISTCHECK_CONFIGURE_FLAGS
[projects/rc-scripts.git] / make-tag.sh
index 559f404745cd112ab0addfeaf8a43085bde7d6c2..2ad825dfe7524a1d15504dabd1a8e1c5f059d01a 100755 (executable)
@@ -1,13 +1,30 @@
 #!/bin/sh
-url=$(svn info | awk '/^URL:/{gsub("/trunk$", "", $2); print $2}')
-rev=$(svn info | awk '/^Revision:/{print $2}')
+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
 
-svn cp $url/trunk $url/tags/$tag
+git tag -a "$tag" $rev
+
+cat <<EOF
+
+To push tag, execute:
+
+  git push origin "refs/tags/$tag"
+EOF
This page took 0.040326 seconds and 4 git commands to generate.