You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2016/09/04 14:12:51 UTC

[2/2] git commit: [flex-falcon] [refs/heads/release0.7.0] - try to get release script to honor tag

try to get release script to honor tag


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/c0bc4d3b
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/c0bc4d3b
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/c0bc4d3b

Branch: refs/heads/release0.7.0
Commit: c0bc4d3b230b2a0508c1fdaec1b3ab87419d5d9a
Parents: 7cfd14b
Author: Alex Harui <ah...@apache.org>
Authored: Sun Sep 4 07:12:45 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Sun Sep 4 07:12:45 2016 -0700

----------------------------------------------------------------------
 releasecandidate.xml | 35 ++++++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c0bc4d3b/releasecandidate.xml
----------------------------------------------------------------------
diff --git a/releasecandidate.xml b/releasecandidate.xml
index 2044b02..ad7cf62 100644
--- a/releasecandidate.xml
+++ b/releasecandidate.xml
@@ -20,6 +20,7 @@
 
 <project name="CreateFalconReleaseCandidate" default="main" basedir=".">
 
+    <!-- use -Dtag=<tag or commit hash> to build from other than the head -->
 
     <!-- Required for OSX 10.6 / Snow Leopard Performance. -->
     <!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
@@ -185,6 +186,13 @@
         uri="antlib:org.apache.rat.anttasks"
         classpathref="anttask.classpath"/>
     </target>
+    
+    <target name="checkout_tag" if="tag" >
+        <exec executable="${git}" dir="${basedir}" failonerror="true" >
+            <arg value="checkout" />
+            <arg value="${tag}" />
+        </exec>
+    </target>
 
     <target name="main" depends="install-rat,credentials" description="Perform required release approval steps">
 		<antcall target="check-new-version" />
@@ -192,6 +200,7 @@
 			<arg value="pull" />
 			<arg value="--rebase" />
 		</exec>
+        <antcall target="checkout_tag" />
 		<ant antfile="build.xml" target="release" />
 		<ant antfile="build.xml" target="create-md5" />
 		<ant antfile="build.xml" target="sign" />
@@ -225,20 +234,24 @@
 			<arg value="-m" />
 			<arg value="rc${rc} of Apache Flex Falcon ${release.version}" />
 		</exec>
-		<exec executable="${git}" dir="${basedir}" failonerror="true" >
-			<arg value="tag" />
-			<arg value="-a" />
-			<arg value="apache-flex-falcon-${release.version}-rc${rc}" />
-			<arg value="-m" />
-			<arg value="&quot;rc${rc} of apache-flex-falcon-${release.version}&quot;" />
-		</exec>
-		<exec executable="${git}" dir="${basedir}" failonerror="true" >
-			<arg value="push" />
-			<arg value="--tags" />
-		</exec>
+        <antcall target="tag_release" />
 		<antcall target="update-installer-config" />
 		<antcall target="mail" />
     </target>
+    
+    <target name="tag_release" unless="tag" >
+        <exec executable="${git}" dir="${basedir}" failonerror="true" >
+            <arg value="tag" />
+            <arg value="-a" />
+            <arg value="apache-flex-falcon-${release.version}-rc${rc}" />
+            <arg value="-m" />
+            <arg value="&quot;rc${rc} of apache-flex-falcon-${release.version}&quot;" />
+        </exec>
+        <exec executable="${git}" dir="${basedir}" failonerror="true" >
+            <arg value="push" />
+            <arg value="--tags" />
+        </exec>
+    </target>
 
 	<target name="credentials" depends="get-username,get-password">
 		<echo>${apache.username}</echo>