Permalink
Browse files

Modified Ant target 'release' and added new target 'snapshot'.

ant release: builds Voldemort release version (voldemort-0.52.jar)
ant snapshot: builds release snapshot with Hudson build number (voldemort-0.52-snapshot-55.jar)
  • Loading branch information...
1 parent 2addb2d commit 5a078881dd53352fa4e18deed59f260297277075 @bbansal bbansal committed Jun 24, 2009
Showing with 17 additions and 3 deletions.
  1. +1 −1 build.properties
  2. +16 −2 build.xml
View
@@ -33,4 +33,4 @@ tomcat.manager.password=tomcat
tomcat.context=/voldemort
## Release
-curr.release.base=0.52-snapshot
+curr.release.base=0.52
View
@@ -17,7 +17,7 @@
<!-- set the build number based on environment variable, otherwise blank -->
<property environment="env" description="System environment variables (including those set by Hudson)"/>
- <condition property="curr.release" value="${curr.release.base}-build-${env.BUILD_NUMBER}" else="${curr.release.base}">
+ <condition property="curr.release.snapshot" value="${curr.release.base}-snapshot-${env.BUILD_NUMBER}" else="${curr.release.base}">
<isset property="env.BUILD_NUMBER" />
</condition>
@@ -210,7 +210,12 @@
</junitreport>
</target>
- <target name="release" depends="all" description="Create a release zip file with everything pre-built.">
+
+ <macrodef name="create-release-artifacts">
+ <attribute name="version" />
+ <sequential>
+ <property name="curr.release" value="@{version}"/>
+ <antcall target="all"/>
<zip destfile="${dist.dir}/${name}-${curr.release}.zip">
<zipfileset dir="." prefix="voldemort-${curr.release}" filemode="755" includes="bin/*"/>
<zipfileset dir="." prefix="voldemort-${curr.release}" includes="**">
@@ -226,6 +231,15 @@
<exclude name="bin/*"/>
</tarfileset>
</tar>
+ </sequential>
+ </macrodef>
+
+ <target name="snapshot" description="Create a release-snapshot zip file with everything pre-built.">
+ <create-release-artifacts version="${curr.release.snapshot}" />
+ </target>
+
+ <target name="release" description="Create a release zip file with everything pre-built.">
+ <create-release-artifacts version="${curr.release.base}" />
</target>
<target name="hadoop-benchmark-jar" depends="build, contrib-build"

0 comments on commit 5a07888

Please sign in to comment.