VERSION: prepare for beta1 by setting and parsing the beta version
authorAndrew Bartlett <abartlet@samba.org>
Mon, 4 Jun 2012 23:07:44 +0000 (09:07 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 5 Jun 2012 02:27:36 +0000 (04:27 +0200)
VERSION
buildtools/wafsamba/samba_version.py
source3/script/mkversion.sh

diff --git a/VERSION b/VERSION
index 1dc74f24fd09b900a21c112bc3df8283f5fab4b9..9cfbd4e9cf535cc9cdadc8537cb2db60431e231e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -57,7 +57,17 @@ SAMBA_VERSION_TP_RELEASE=
 # e.g. SAMBA_VERSION_ALPHA_RELEASE=1                   #
 #  ->  "4.0.0alpha1"                                   #
 ########################################################
 # e.g. SAMBA_VERSION_ALPHA_RELEASE=1                   #
 #  ->  "4.0.0alpha1"                                   #
 ########################################################
-SAMBA_VERSION_ALPHA_RELEASE=22
+SAMBA_VERSION_ALPHA_RELEASE=
+
+########################################################
+# For 'alpha' releases the version will be             #
+#                                                      #
+# <MAJOR>.<MINOR>.<RELEASE>beta<TP_RELEASE>            #
+#                                                      #
+# e.g. SAMBA_VERSION_BETA_RELEASE=1                    #
+#  ->  "4.0.0beta1"                                    #
+########################################################
+SAMBA_VERSION_BETA_RELEASE=1
 
 ########################################################
 # For 'pre' releases the version will be               #
 
 ########################################################
 # For 'pre' releases the version will be               #
index 96d5d0d47d314e2b2b694471ed3754497e26198c..9dae23a908429865af98655755a54ef733e55258 100644 (file)
@@ -107,6 +107,7 @@ also accepted as dictionary entries here
         self.REVISION=None
         self.TP_RELEASE=None
         self.ALPHA_RELEASE=None
         self.REVISION=None
         self.TP_RELEASE=None
         self.ALPHA_RELEASE=None
+        self.BETA_RELEASE=None
         self.PRE_RELEASE=None
         self.RC_RELEASE=None
         self.IS_SNAPSHOT=True
         self.PRE_RELEASE=None
         self.RC_RELEASE=None
         self.IS_SNAPSHOT=True
@@ -137,7 +138,7 @@ also accepted as dictionary entries here
         SAMBA_VERSION_STRING = ("%u.%u.%u" % (self.MAJOR, self.MINOR, self.RELEASE))
 
 ##
         SAMBA_VERSION_STRING = ("%u.%u.%u" % (self.MAJOR, self.MINOR, self.RELEASE))
 
 ##
-## maybe add "3.0.22a" or "4.0.0tp11" or "4.0.0alpha1" or "3.0.22pre1" or "3.0.22rc1"
+## maybe add "3.0.22a" or "4.0.0tp11" or "4.0.0alpha1" or "4.0.0beta1" or "3.0.22pre1" or "3.0.22rc1"
 ## We do not do pre or rc version on patch/letter releases
 ##
         if self.REVISION is not None:
 ## We do not do pre or rc version on patch/letter releases
 ##
         if self.REVISION is not None:
@@ -148,6 +149,9 @@ also accepted as dictionary entries here
         if self.ALPHA_RELEASE is not None:
             self.ALPHA_RELEASE = int(self.ALPHA_RELEASE)
             SAMBA_VERSION_STRING += ("alpha%u" % self.ALPHA_RELEASE)
         if self.ALPHA_RELEASE is not None:
             self.ALPHA_RELEASE = int(self.ALPHA_RELEASE)
             SAMBA_VERSION_STRING += ("alpha%u" % self.ALPHA_RELEASE)
+        if self.BETA_RELEASE is not None:
+            self.BETA_RELEASE = int(self.BETA_RELEASE)
+            SAMBA_VERSION_STRING += ("beta%u" % self.BETA_RELEASE)
         if self.PRE_RELEASE is not None:
             self.PRE_RELEASE = int(self.PRE_RELEASE)
             SAMBA_VERSION_STRING += ("pre%u" % self.PRE_RELEASE)
         if self.PRE_RELEASE is not None:
             self.PRE_RELEASE = int(self.PRE_RELEASE)
             SAMBA_VERSION_STRING += ("pre%u" % self.PRE_RELEASE)
@@ -201,6 +205,9 @@ also accepted as dictionary entries here
         if self.ALPHA_RELEASE is not None:
             string+="#define SAMBA_VERSION_ALPHA_RELEASE %u\n" % self.ALPHA_RELEASE
 
         if self.ALPHA_RELEASE is not None:
             string+="#define SAMBA_VERSION_ALPHA_RELEASE %u\n" % self.ALPHA_RELEASE
 
+        if self.BETA_RELEASE is not None:
+            string+="#define SAMBA_VERSION_BETA_RELEASE %u\n" % self.BETA_RELEASE
+
         if self.PRE_RELEASE is not None:
             string+="#define SAMBA_VERSION_PRE_RELEASE %u\n" % self.PRE_RELEASE
 
         if self.PRE_RELEASE is not None:
             string+="#define SAMBA_VERSION_PRE_RELEASE %u\n" % self.PRE_RELEASE
 
index e6b375e6132f5a1d564d44483f8612cba0182e3b..ef3582a54691257075c61df6f623c43ff117fda8 100755 (executable)
@@ -20,6 +20,7 @@ SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' $SOURCE_DIR$VERSION
 SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' $SOURCE_DIR$VERSION_FILE`
 
 SAMBA_VERSION_TP_RELEASE=`sed -n 's/^SAMBA_VERSION_TP_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
 SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' $SOURCE_DIR$VERSION_FILE`
 
 SAMBA_VERSION_TP_RELEASE=`sed -n 's/^SAMBA_VERSION_TP_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
+SAMBA_VERSION_BETA_RELEASE=`sed -n 's/^SAMBA_VERSION_BETA_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
 SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
 SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
 
 SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
 SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
 
@@ -55,6 +56,9 @@ if test -n "${SAMBA_VERSION_REVISION}";then
 elif test -n "${SAMBA_VERSION_TP_RELEASE}";then
     SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}tp${SAMBA_VERSION_TP_RELEASE}"
     echo "#define SAMBA_VERSION_TP_RELEASE ${SAMBA_VERSION_TP_RELEASE}" >> $OUTPUT_FILE
 elif test -n "${SAMBA_VERSION_TP_RELEASE}";then
     SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}tp${SAMBA_VERSION_TP_RELEASE}"
     echo "#define SAMBA_VERSION_TP_RELEASE ${SAMBA_VERSION_TP_RELEASE}" >> $OUTPUT_FILE
+elif test -n "${SAMBA_VERSION_BETA_RELEASE}";then
+    SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}beta${SAMBA_VERSION_BETA_RELEASE}"
+    echo "#define SAMBA_VERSION_BETA_RELEASE ${SAMBA_VERSION_BETA_RELEASE}" >> $OUTPUT_FILE
 elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then
     ## maybe add "3.0.22pre2"
     SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}"
 elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then
     ## maybe add "3.0.22pre2"
     SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}"