You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2018/05/17 16:10:20 UTC

commons-release-plugin git commit: Get git tag commit and put it in the VOTE.txt file.

Repository: commons-release-plugin
Updated Branches:
  refs/heads/master 2a1f955f1 -> 80ba103c6


Get git tag commit and put it in the VOTE.txt file.

Project: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/commit/80ba103c
Tree: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/tree/80ba103c
Diff: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/diff/80ba103c

Branch: refs/heads/master
Commit: 80ba103c613dfe0303ca16ab98ce95fd79065700
Parents: 2a1f955
Author: Gary Gregory <ga...@gmail.com>
Authored: Thu May 17 10:10:17 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Thu May 17 10:10:17 2018 -0600

----------------------------------------------------------------------
 .../vote-txt-template.txt                       |  6 ++---
 src/main/scripts/generate-xdocs.build.xml       | 27 ++++++++++++++++----
 2 files changed, 25 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/80ba103c/src/main/resources/commons-xdoc-templates/vote-txt-template.txt
----------------------------------------------------------------------
diff --git a/src/main/resources/commons-xdoc-templates/vote-txt-template.txt b/src/main/resources/commons-xdoc-templates/vote-txt-template.txt
index 5e94f80..d7cf266 100644
--- a/src/main/resources/commons-xdoc-templates/vote-txt-template.txt
+++ b/src/main/resources/commons-xdoc-templates/vote-txt-template.txt
@@ -21,14 +21,14 @@ Subject: [VOTE] Release @NAME@ @VERSION@ based on @RC@
 We have fixed quite a few bugs and added some significant enhancements since @NAME@ @BC@ was released, so I would like to release @NAME@ @VERSION@.
 
 @NAME@ @VERSION@ @RC@ is available for review here:
-    https://dist.apache.org/repos/dist/dev/commons/@ID@/@ARTIFACTID@-@VERSION@-@RC@ (svn revision @RCREV@)
+    @DISTURL@ (svn revision @RCREV@)
 
 The Subversion tag for this RC is here:
     http://svn.apache.org/repos/asf/commons/proper/@ID@/tags/@ARTIFACTID@-@VERSION@-@RC@/ (svn revision XYZ2)
     N.B. the SVN revision is required because SVN tags are not immutable.
 ***OR***    
-The Git tag for this RC is here:
-    https://git-wip-us.apache.org/repos/asf?p=@ARTIFACTID@.git;a=tag;h=refs/tags/@ARTIFACTID@-@VERSION@-@RC@
+The Git tag @TAGNAME@ commit for this RC is @TAGCOMMIT@ which you can browse here:
+    https://git-wip-us.apache.org/repos/asf?p=commons-@ID@.git;a=tag;h=refs/tags/@TAGNAME@
 
 Maven artifacts are here:
     https://repository.apache.org/content/repositories/orgapachecommons-***NNNN***/org/apache/commons/@ARTIFACTID@/@VERSION@/

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/80ba103c/src/main/scripts/generate-xdocs.build.xml
----------------------------------------------------------------------
diff --git a/src/main/scripts/generate-xdocs.build.xml b/src/main/scripts/generate-xdocs.build.xml
index a8e5b1d..7a435b9 100644
--- a/src/main/scripts/generate-xdocs.build.xml
+++ b/src/main/scripts/generate-xdocs.build.xml
@@ -24,12 +24,19 @@
     <property name="commonsMojoTempDir" value="target/commons-generated-xdocs" />
     <property name="level"              value="info" />
 
-
     <!-- ========== Generate VOTE.txt file ================================ -->
 
     <target name="vote-txt" description="Generates VOTE.txt">
 
-        <echo level="${level}" message="----- commons:vote-txt - Parameters - START -----" />
+        <property name="svn.dist.url" value="https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}/${commons.release.version}-${commons.rc.version}" />
+        <property name="git.tag.name" value="${commons.componentid}-${commons.release.version}-${commons.rc.version}" />
+
+    	<echo level="${level}" message="-----[ commons-release:vote-txt - Expectations - START   ]-----" />
+    	<echo level="${level}" message="The SVN RC URL must be '${svn.dist.url}'" />
+    	<echo level="${level}" message="The Git RC tag must be '${git.tag.name}'" />
+    	<echo level="${level}" message="-----[ commons-release:vote-txt - Expectations - END     ]-----" />
+        <echo level="${level}" message="" />
+        <echo level="${level}" message="-----[ commons-release:vote-txt - Parameters - START     ]-----" />
         <echo level="${level}" message="project.name                : ${project.name}" />
         <echo level="${level}" message="project.artifactId          : ${project.artifactId}" />
         <echo level="${level}" message="project.groupId             : ${project.groupId}" />
@@ -40,7 +47,7 @@
         <echo level="${level}" message="commons.componentid         : ${commons.componentid}" />
         <echo level="${level}" message="commons.releaseManagerName  : ${commons.releaseManagerName}" />
         <echo level="${level}" message="commons.releaseManagerKey   : ${commons.releaseManagerKey}" />
-        <echo level="${level}" message="----- commons:vote-txt - Parameters - END   -----" />
+        <echo level="${level}" message="-----[ commons-release:vote-txt - Parameters - END       ]-----" />
 
         <echo level="info" message="*** Generating ${project.name} VOTE.txt ***" />
 
@@ -67,12 +74,19 @@
             </filterchain>
         </loadresource>
 
+    	<!-- Get the SVN revision from the dist repository. -->
         <exec executable="svn" outputproperty="svn.rc.revision">
-          <arg line="info https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}/${commons.release.version}-${commons.rc.version} --show-item revision" />
+          <arg line="info ${svn.dist.url} --show-item revision" />
         </exec>
         <echo level="${level}" message="svn.rc.revision             : ${svn.rc.revision}" />
 
-        <!-- Copy the vote-txt template filtering to replace properties -->
+    	<!-- Get the Git commit hash for the RC tag. -->
+        <exec executable="git" outputproperty="git.tag.commit">
+          <arg line="rev-list -n 1 ${git.tag.name}" />
+        </exec>
+        <echo level="${level}" message="git.tag.commit              : ${git.tag.commit}" />
+
+        <!-- Copy the vote-txt template filtering to replace properties. -->
         <copy file="${commonsMojoTempDir}/vote-txt-template.txt" tofile="VOTE.txt" overwrite="true">
             <filterset>
              <filter token="NAME"           value="${project.name}"/>
@@ -89,6 +103,9 @@
              <filter token="RMKEY"          value="${commons.releaseManagerKey}"/>            	
              <filter token="RCREV"          value="${svn.rc.revision}"/>            	
              <filter token="SHA1LIST"       value="${commons.sha1list}"/>            	
+             <filter token="DISTURL"        value="${svn.dist.url}"/>            	
+             <filter token="TAGNAME"        value="${git.tag.name}"/>            	
+             <filter token="TAGCOMMIT"      value="${git.tag.commit}"/>            	
             </filterset>
         </copy>