</mx:if>\r
\r
<!-- create the release process script -->\r
- <mx:if>\r
- <os family="windows" />\r
- <then>\r
- <!-- Windows PowerShell script -->\r
- <!-- set-executionpolicy remotesigned -->\r
- <property name="recipe" value="release_${project.version}.ps1" />\r
- </then>\r
- <else>\r
- <!-- Bash script -->\r
- <property name="recipe" value="release_${project.version}.sh" />\r
- </else>\r
- </mx:if>\r
- <delete file="${recipe}" failonerror="false" quiet="true" verbose="false" />\r
- <!-- Work-around for lack of proper ant property substitution in copy -->\r
- <property name="dollar" value="$"/>\r
- <copy file="release.template" tofile="${recipe}">\r
- <filterset begintoken="${dollar}{" endtoken="}">\r
- <filter token="project.version" value="${project.version}" />\r
- <filter token="project.commitId" value="${project.commitId}" />\r
- <filter token="project.tag" value="${project.tag}" />\r
- <filter token="project.directory" value="${basedir}" />\r
- <filter token="maven.directory" value="${maven.directory}" />\r
- </filterset>\r
- </copy>\r
- <chmod file="${recipe}" perm="ugo+rx" />\r
+ <createReleaseScript\r
+ projectVersion="${project.version}"\r
+ projectTag="${project.tag}"\r
+ projectCommitId="${project.commitId}" />\r
+ </target>\r
+\r
+\r
+ <!--\r
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
+ Create the release process script from the template.\r
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
+ -->\r
+ <target name="releaseScript" depends="prepare" description="create the release process script for a release version">\r
+ <!-- create the release process script -->\r
+ <createReleaseScript\r
+ projectVersion="${project.version}"\r
+ projectTag="${release.tag}"\r
+ projectCommitId="${release.tag}" />\r
</target>\r
\r
- \r
+\r
<!--\r
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \r
Prepare for the next point release development cycle.\r
</mx:commit> \r
</target>\r
\r
- \r
+\r
+\r
+\r
+ <!--\r
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
+ Create the release process script from the template.\r
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
+ -->\r
+ <macrodef name="createReleaseScript">\r
+ <attribute name="projectVersion" />\r
+ <attribute name="projectTag" />\r
+ <attribute name="projectCommitId" />\r
+ <sequential>\r
+ <mx:if>\r
+ <os family="windows" />\r
+ <then>\r
+ <!-- Windows PowerShell script -->\r
+ <!-- set-executionpolicy remotesigned -->\r
+ <property name="recipe" value="release_@{projectVersion}.ps1" />\r
+ </then>\r
+ <else>\r
+ <!-- Bash script -->\r
+ <property name="recipe" value="release_@{projectVersion}.sh" />\r
+ </else>\r
+ </mx:if>\r
+ <delete file="${recipe}" failonerror="false" quiet="true" verbose="false" />\r
+ <!-- Work-around for lack of proper ant property substitution in copy -->\r
+ <property name="dollar" value="$"/>\r
+ <copy file="release.template" tofile="${recipe}">\r
+ <filterset begintoken="${dollar}{" endtoken="}">\r
+ <filter token="project.version" value="@{projectVersion}" />\r
+ <filter token="project.commitId" value="@{projectCommitId}" />\r
+ <filter token="project.tag" value="@{projectTag}" />\r
+ <filter token="project.directory" value="${basedir}" />\r
+ <filter token="maven.directory" value="${maven.directory}" />\r
+ </filterset>\r
+ </copy>\r
+ <chmod file="${recipe}" perm="ugo+rx" />\r
+ </sequential>\r
+ </macrodef>\r
+\r
<!--\r
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
Build Gitblit Docs\r