Permalink
Browse files

Change tag sort and auto-annotate created tags.

Tag sort is now done by date on the tag, not alpha. This should
ensure we're always looking at the latest tag when incrementing
version number while remaining much simpler than a version sort.

Tags that are created by feature finish and hotfix finish are now
auto-annotated with the version number. This can still be
overridden by adding a -m flag with message to the finish call,
but avoids an unnecessary interruption since the actual tag
message is mostly worthless, but we have to have it to get
author and date metadata.
  • Loading branch information...
1 parent c48e240 commit 79d1a15d3b2e128bfee06fc4d57c6054a5276c3d Nickolas Means committed May 25, 2011
Showing with 11 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +5 −1 git-flow-hotfix
  3. +5 −1 git-flow-release
View
@@ -2,3 +2,4 @@ debian/files
debian/*.substvars
debian/*.debhelper.log
debian/*/*
+*.swp
View
@@ -242,7 +242,11 @@ cmd_finish() {
local opts="-a"
flag sign && opts="$opts -s"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
- [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
+ if [ "$FLAGS_message" != "" ]; then
+ opts="$opts -m '$FLAGS_message'"
+ else
+ opts="$opts -m '$VERSION_PREFIX$VERSION'"
+ fi
git tag $opts "$VERSION_PREFIX$VERSION" || \
die "Tagging failed. Please run finish again to retry."
fi
View
@@ -240,7 +240,11 @@ cmd_finish() {
local opts="-a"
flag sign && opts="$opts -s"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
- [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
+ if [ "$FLAGS_message" != "" ]; then
+ opts="$opts -m '$FLAGS_message'"
+ else
+ opts="$opts -m '$VERSION_PREFIX$VERSION'"
+ fi
git tag $opts "$tagname" || \
die "Tagging failed. Please run finish again to retry."
fi

0 comments on commit 79d1a15

Please sign in to comment.