summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.number2
-rw-r--r--build.xml28
2 files changed, 19 insertions, 11 deletions
diff --git a/build.number b/build.number
index 4c8b62076d..e5a19b9b7e 100644
--- a/build.number
+++ b/build.number
@@ -2,6 +2,8 @@
version.major=2
version.minor=9
version.patch=2
+# This is the -N part of a version. if it's 0, it's dropped from maven versions.
+version.bnum=0
# Note: To build a release run ant with -Dbuild.release=true
# To build an RC, run ant with -Dmaven.version.suffix=-RCN
diff --git a/build.xml b/build.xml
index 20f953cd4f..3bc905887e 100644
--- a/build.xml
+++ b/build.xml
@@ -166,6 +166,8 @@ PROPERTIES
<!-- Loads custom properties definitions -->
<property file="${basedir}/build.properties"/>
+ <!-- Generating version number -->
+ <property file="${basedir}/build.number"/>
<!-- Additional command line arguments for scalac. They are added to all build targets -->
<property name="scalac.args" value=""/>
@@ -237,16 +239,27 @@ INITIALISATION
</target>
<!-- Determines OSGi string + maven extension. -->
+ <target name="init.hasbuildnum">
+ <condition property="version.hasbuildnum">
+ <not><equals arg1="${version.bnum}" arg2="0"/></not>
+ </condition>
+ </target>
<target name="init.build.snapshot" unless="build.release">
- <property name="version.suffix" value="DEV"/>
+ <property name="version.suffix" value="dev"/>
<property name="maven.version.suffix" value="-SNAPSHOT"/>
</target>
- <target name="init.build.release" if="build.release">
- <property name="version.suffix" value="FINAL"/>
+ <target name="init.build.release" if="build.release" unless="version.hasbuildnum" depends="init.hasbuildnum">
+ <property name="version.suffix" value="v0"/>
<property name="maven.version.suffix" value=""/>
</target>
+ <!-- funny thing, ant is. Can only specify *one* property in if check. Guaranteed that both are true here,
+ since properties are immutable. -->
+ <target name="init.build.patch.release" if="version.hasbuildnum" depends="init.hasbuildnum, init.build.snapshot">
+ <property name="version.suffix" value="v${version.bnum}"/>
+ <property name="maven.version.suffix" value="-${version.bnum}"/>
+ </target>
- <target name="init.build.suffix.done" depends="init.build.snapshot, init.build.release"/>
+ <target name="init.build.suffix.done" depends="init.build.snapshot, init.build.release, init.build.patch.release"/>
<target name="init" depends="init.jars, init.build.suffix.done">
<!-- scalac.args.optimise is selectively overridden in certain antcall tasks. -->
@@ -275,9 +288,6 @@ INITIALISATION
<property name="version.number" value="-unknown-"/>
<property name="init.avail" value="yes"/>
-
- <!-- Generating version number -->
- <property file="${basedir}/build.number"/>
<!-- We use the git describe to determine the OSGi modifier for our build. -->
<property
name="version.number"
@@ -317,9 +327,6 @@ INITIALISATION
<path refid="lib.extra"/>
</path>
-<<<<<<< HEAD
- <!-- Define tasks that can be run with Starr -->
-=======
<!-- And print-out what we are building -->
<echo message=" build time: ${time.human}" />
<echo message=" java version: ${java.vm.name} ${java.version}" />
@@ -330,7 +337,6 @@ INITIALISATION
<echo message=" OSGi version: ${version.number}" />
<!-- Define tasks that can be run with Starr -->
->>>>>>> 6ec24f1611... Fixes to build numbering system for 2.9.x release
<path id="starr.classpath">
<pathelement location="${lib.starr.jar}"/>
<pathelement location="${comp.starr.jar}"/>