#!/bin/sh
set -e
rev=$(git rev-parse HEAD)
+last_tag=$(git tag -l | grep -E '^[0-9]+' | sort -V | tail -n1)
if [ -n "$1" ]; then
tag="$1"
tag=$(($1 + $2))
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