[chronojump/chronojump_version] Uses the full git describe in the PACKAGE_VERSION and the simplie one for the assembly files.



commit 84bf50ee52625c6a98496a0e9d16840b0d3ef101
Author: Carles Pina i Estany <carles pina cat>
Date:   Mon Oct 17 19:54:58 2016 +0200

    Uses the full git describe in the PACKAGE_VERSION and the simplie one for the assembly files.
    
    Doing it this way the command "make dist" generates files like:
    chronojump-1.6.2.tar.gz             # from a tag
    (chronojump-1.6.2-279-g99db5c9.tar.gz       # from a version that is not a tag

 CesarPlayer/AssemblyInfo.cs.in |    2 +-
 configure.ac                   |   11 +++++------
 howto_new_version.txt          |   19 +++++++++----------
 src/AssemblyInfo.cs.in         |    2 +-
 4 files changed, 16 insertions(+), 18 deletions(-)
---
diff --git a/CesarPlayer/AssemblyInfo.cs.in b/CesarPlayer/AssemblyInfo.cs.in
index 08721f2..a2fc01a 100644
--- a/CesarPlayer/AssemblyInfo.cs.in
+++ b/CesarPlayer/AssemblyInfo.cs.in
@@ -41,7 +41,7 @@ using System.Runtime.CompilerServices;
 // You can specify all values by your own or you can build default build and revision
 // numbers with the '*' character (the default):
 
-[assembly: AssemblyVersion("@PACKAGE_VERSION@")]
+[assembly: AssemblyVersion("@PACKAGE_SIMPLIFIED_VERSION@")]
 
 // The following attributes specify the key for the sign of your assembly. See the
 // .NET Framework documentation for more information about signing.
diff --git a/configure.ac b/configure.ac
index 2a360e8..b573128 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,12 +1,11 @@
 AC_PREREQ([2.54])
 
-# chronojump variable is used in the Assembly version and can only have major.minor.release
-AC_INIT([chronojump], [m4_esyscmd_s([git describe --abbrev=0])])
+# PACKAGE_VERSION variable comes from here (e.g. to show it to the user,
+# distribution package names, etc.)
+AC_INIT([chronojump], [m4_esyscmd_s([git describe])])
 
-# BUILD_CHRONOJUMP_VERSION is used to display it to the user
-# "git describe" is 1.6.2 if it's a tagged version or
-# 1.6.2-number_of_commits_since_last_tag-sha1 if it's not
-AC_SUBST([BUILD_CHRONOJUMP_VERSION], [m4_esyscmd_s([git describe])])
+# This is used in AssemblyInfo.cs.in: it can only be major.minor.release format
+AC_SUBST([PACKAGE_SIMPLIFIED_VERSION], [m4_esyscmd_s([git describe --abbrev=0])])
 
 # Date of the last commit
 AC_SUBST([BUILD_CHRONOJUMP_LAST_COMMIT_TIMESTAMP], [m4_esyscmd_s([git log -1 --format=%ct])])
diff --git a/howto_new_version.txt b/howto_new_version.txt
index e8c4af9..5e0b2cb 100644
--- a/howto_new_version.txt
+++ b/howto_new_version.txt
@@ -1,13 +1,9 @@
+
 1) copy manual PDFs from chronojump-docs repository, because in chronojump repository PDFs are not updated
 check is "updated to last version"
 cp ../chronojump-docs/chronojump_manual_e*.pdf manual/
 
-2) change version on configure.ac
-3) Run autoconf (this will update src/AssemblyInfo.cs - this file is not in the git repo, it's generated 
from src/AssemblyInfo.cs.in)
-
-
-linux stuff
-------------
+2) git tag (Chronojump's version depends on the tag):
 VERSION=1.6.2
 git commit -a -m "Bump version $VERSION"
 
@@ -15,16 +11,19 @@ git tag -a "$VERSION"
 git push
 git push origin --tags
 
-sh autogen.sh
-make dist
-
+# If some day we decide to do branching instead of tags:
 #with branching:
 #git checkout -b "tags/$VERSION" # creates a new branch
 # keep doing commits:
 # git commit -a
 # git commit -a
 # git cherry-pick -x "commit-from-master-or-some-branch-that-we-want-here"
-#When we are happy:
+# And see other comments of the document
+
+Linux stuff
+------------
+sh autogen.sh
+make dist
 
 scp "chronojump-$VERSION.tar.gz" xaviblas master gnome org:.
 ssh xaviblas master gnome org
diff --git a/src/AssemblyInfo.cs.in b/src/AssemblyInfo.cs.in
index 56e0112..6a3b5c2 100644
--- a/src/AssemblyInfo.cs.in
+++ b/src/AssemblyInfo.cs.in
@@ -26,7 +26,7 @@ using System.Runtime.CompilerServices;
 // You can specify all values by your own or you can build default build and revision
 // numbers with the '*' character (the default):
 
-[assembly: AssemblyVersion("@PACKAGE_VERSION@")]
+[assembly: AssemblyVersion("@PACKAGE_SIMPLIFIED_VERSION@")]
 
 // The following attributes specify the key for the sign of your assembly. See the
 // .NET Framework documentation for more information about signing.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]