diff options
author | Josh Suereth <joshua.suereth@gmail.com> | 2012-03-14 09:03:38 -0400 |
---|---|---|
committer | Josh Suereth <joshua.suereth@gmail.com> | 2012-03-14 09:03:38 -0400 |
commit | 31653af16a2a9337df6071147453242d2bcb0db6 (patch) | |
tree | 58c7a975688af9cb0c3717d8473d2be28bf3ed5a | |
parent | 6ec24f161105b1cb54fd1048c5757255a5530098 (diff) | |
download | scala-31653af16a2a9337df6071147453242d2bcb0db6.tar.gz scala-31653af16a2a9337df6071147453242d2bcb0db6.tar.bz2 scala-31653af16a2a9337df6071147453242d2bcb0db6.zip |
Moved to Mirco's versioning idea.
-rw-r--r-- | build.number | 2 | ||||
-rw-r--r-- | build.xml | 23 |
2 files changed, 19 insertions, 6 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 @@ -154,6 +154,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=""/> @@ -212,16 +214,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.starr, init.build.suffix.done"> <!-- scalac.args.optimise is selectively overridden in certain antcall tasks. --> @@ -250,8 +263,6 @@ INITIALISATION <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" |