diff options
author | James Moger <james.moger@gitblit.com> | 2013-07-14 12:04:52 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-07-14 12:04:52 -0400 |
commit | 5aec867b2fae0ff039d0ca4228ccceadecf316c9 (patch) | |
tree | d60028a63fa91268746f6cf11137c8c8015415e2 /build.xml | |
parent | 044549d7c39780f19326ff1492aa818ad51a8d48 (diff) | |
download | gitblit-5aec867b2fae0ff039d0ca4228ccceadecf316c9.tar.gz gitblit-5aec867b2fae0ff039d0ca4228ccceadecf316c9.zip |
Added release script template and build.xml adjustments
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 49 |
1 files changed, 33 insertions, 16 deletions
@@ -806,7 +806,7 @@ Update the gh-pages branch with the current site
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
- <target name="updateGhPages" depends="buildSite">
+ <target name="updateGhPages">
<!-- Build gh-pages branch -->
<mx:ghpages repositorydir="${basedir}" obliterate="true" />
</target>
@@ -817,7 +817,7 @@ Publish binaries to Google Code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
- <target name="publishBinaries" depends="clean,buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary" description="Publish the Gitblit binaries to Google Code">
+ <target name="publishBinaries" description="Publish the Gitblit binaries to Google Code">
<echo>Uploading Gitblit ${project.version} binaries</echo>
@@ -869,34 +869,25 @@ <!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Publish site to site hosting service
- You must add ext/commons-net-1.4.0.jar to your ANT classpath.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
- <target name="publishSite" depends="clean,buildSite,updateGhPages" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)" >
+ <target name="publishSite" depends="clean,buildSite,updateGhPages" description="Publish the Gitblit site to a host" >
<echo>Uploading Gitblit ${project.version} website</echo>
- <ftp server="${ftp.server}"
+ <mx:ftp server="${ftp.server}"
userid="${ftp.user}"
password="${ftp.password}"
remotedir="${ftp.dir}"
passive="true"
verbose="yes">
<fileset dir="${project.siteTargetDirectory}" />
- </ftp>
+ </mx:ftp>
</target>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Compile from source, publish binaries, and build & deploy site
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="publishAll" depends="publishBinaries,publishSite" />
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tag a new version and prepare for the next development cycle.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
@@ -904,19 +895,45 @@ <!-- release -->
<property name="dryrun" value="false" />
<mx:version stage="release" dryrun="${dryrun}" />
+ <property name="project.tag" value="v${project.version}" />
<!-- commit build.moxie & releases.moxie (automatic) -->
<mx:commit showtitle="no">
<message>Prepare ${project.version} release</message>
- <tag name="v${project.version}">
+ <tag name="${project.tag}">
<message>${project.name} ${project.version} release</message>
</tag>
</mx:commit>
+ <!-- create the release process script -->
+ <mx:if>
+ <os family="windows" />
+ <then>
+ <!-- Windows PowerShell script -->
+ <!-- set-executionpolicy remotesigned -->
+ <property name="recipe" value="release_${project.version}.ps1" />
+ </then>
+ <else>
+ <!-- Bash script -->
+ <property name="recipe" value="release_${project.version}.sh" />
+ </else>
+ </mx:if>
+ <delete file="${recipe}" failonerror="false" quiet="true" verbose="false" />
+ <!-- Work-around for lack of proper ant property substitution in copy -->
+ <property name="dollar" value="$"/>
+ <copy file="release.template" tofile="${recipe}">
+ <filterset begintoken="${dollar}{" endtoken="}">
+ <filter token="project.version" value="${project.version}" />
+ <filter token="project.commitId" value="${project.commitId}" />
+ <filter token="project.tag" value="${project.tag}" />
+ </filterset>
+ </copy>
+ <chmod file="${recipe}" perm="ugo+rx" />
+
<!-- next cycle -->
<mx:version stage="snapshot" incrementNumber="incremental" dryrun="${dryrun}" />
<mx:commit showtitle="no">
<message>Reset build identifiers for next development cycle</message>
- </mx:commit>
+ </mx:commit>
</target>
|