Change the number scheme for snapshots.
authorWerner Koch <wk@gnupg.org>
Wed, 2 May 2012 14:59:57 +0000 (16:59 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 2 May 2012 14:59:57 +0000 (16:59 +0200)
--

README
configure.ac

diff --git a/README b/README
index ba09403..27c236d 100644 (file)
--- a/README
+++ b/README
@@ -128,6 +128,11 @@ example:
   1.0.1rc1          - The first release candidate for 1.0.1
   1.0.1-svn1240     - yet another snapshot
   1.0.1             - The final 1.0.1 release
+  2.1.1             - The final 2.1.1 release
+  2.1.1-34299-beta  - A snapshot before the 2.1.1 release.
+                      (The number 34299 is computed from the first 4
+                       characters of the GIT SHA-1 (85fb) converted to
+                       decimal.)
 
 The important point is that we bump up the version number before we do
 an release and append a suffix to mark it as a development version.
index d3ad2eb..f8d8f0f 100644 (file)
@@ -29,8 +29,11 @@ m4_define([my_isgit], [yes])
 
 m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \
           | awk '/^\* / {printf "%s",$3}']))
+# We also define a decimal version of the git revision.
+m4_define([git_revision_dec],
+  m4_esyscmd_s([echo 0000$((0x$(echo ]git_revision[|head -c 4)))|tail -c 6]))
 m4_define([my_full_version],
-          [my_version[]m4_if(my_isgit,[yes],[-git[]git_revision])])
+          [my_version[]m4_if(my_isgit,[yes],[-[]git_revision_dec[]-beta])])
 AC_INIT([gpg4win],[my_full_version],[gpg4win-devel@wald.intevation.org])
 
 # Remember to update these version numbers also in the NEWS file.
@@ -54,7 +57,7 @@ MANUALINPROGRESS_EN=m4_if(my_isgit,[yes],["~and may have been further edited"])
 PACKAGE=$PACKAGE_NAME
 VERSION=$PACKAGE_VERSION
 GIT_REVISION=git_revision
-GIT_REVISION_DEC="$((0x$(echo git_revision | head -c 4)))"
+GIT_REVISION_DEC=git_revision_dec
 
 
 AC_CONFIG_SRCDIR(include/config.nsi.in)