You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2010/10/18 18:29:08 UTC

svn commit: r1023889 - in /db/derby/code/trunk: build.xml java/build/org/apache/derbyPreBuild/ReleaseProperties.java

Author: rhillegas
Date: Mon Oct 18 16:29:07 2010
New Revision: 1023889

URL: http://svn.apache.org/viewvc?rev=1023889&view=rev
Log:
DERBY-2573: pass release variables into the newly parameterized docs build so that release documentation is built with current information.

Modified:
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/java/build/org/apache/derbyPreBuild/ReleaseProperties.java

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=1023889&r1=1023888&r2=1023889&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Mon Oct 18 16:29:07 2010
@@ -1919,7 +1919,7 @@
 
       <antcall target="checkinfile">
          <param name="checkinComment" value="Check in SQLState tables as part of building a release."/>
-         <param name="fileName" value="${refdir}/${sqlstateTables}"/>
+         <param name="fileName" value="${refdir}/rrefexcept71493.dita"/>
       </antcall>
 
      <!-- Bring the docs client up to date again -->
@@ -1961,11 +1961,26 @@
    <!-- Build the user documentation -->
    <target name="builduserdocs" depends="checkdocsroot">
 
+     <property file="${properties.dir}/release.properties"/>
+
+      <antcall target="getsvnversion"/>
+      <loadfile srcFile="${out.base}/changenumber.properties"
+               failonerror="false"
+               property="changenumber">
+        <filterchain>
+          <striplinebreaks/>
+        </filterchain>
+      </loadfile>    
+
      <ant dir="${docs.root}" target="clobber"/>
 
      <exec executable="ant" dir="${docs.root}">
        <env key="ANT_OPTS" value="-Xmx512m"/>
        <env key="CLASSPATH" path="${docs.root}/lib/fop.jar"/>
+       <arg value="-Drelease.id.short=${eversion}"/>
+       <arg value="-Drelease.id.long=${release.id.long}"/>
+       <arg value="-Dcopyright.year=${copyright.year}"/>
+       <arg value="-Dsubversion.revision=${changenumber}"/>
        <arg value="all"/>
      </exec>
 

Modified: db/derby/code/trunk/java/build/org/apache/derbyPreBuild/ReleaseProperties.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyPreBuild/ReleaseProperties.java?rev=1023889&r1=1023888&r2=1023889&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyPreBuild/ReleaseProperties.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyPreBuild/ReleaseProperties.java Mon Oct 18 16:29:07 2010
@@ -38,6 +38,15 @@ import org.apache.tools.ant.Task;
  * when building the Derby distributions. For a description of the Derby release id,
  * see http://db.apache.org/derby/papers/versionupgrade.html
  * </p>
+ *
+ * <p>
+ * This task also sets a property for use by downstream targets during
+ * the release-build:
+ * </p>
+ *
+ * <ul>
+ * <li><b>derby.release.id.new</b> - The new id for the branch, in case we were asked to bump the release id.</li>
+ * </ul>
  */
 
 public class ReleaseProperties extends Task
@@ -67,8 +76,9 @@ public class ReleaseProperties extends T
     
 	public final static int	MAINT_ENCODING = 1000000;
     private final static int MAINT_LENGTH = 7;
-	
 
+    // properties to set on the way out
+    private static final String NEW_RELEASE_ID = "derby.release.id.new";
 
     /////////////////////////////////////////////////////////////////////////
     //
@@ -134,6 +144,7 @@ public class ReleaseProperties extends T
             
             int major = versionID.getMajor();
             int minor = versionID.getMinor();
+            int currentYear = getCurrentYear();
 
             propertiesFW = new FileWriter( target );
             propertiesPW = new PrintWriter( propertiesFW );
@@ -144,12 +155,14 @@ public class ReleaseProperties extends T
             propertiesPW.println( "maint=" + encodeFixpackAndPoint( versionID ) );
             propertiesPW.println( "major=" + major );
             propertiesPW.println( "minor=" + minor );
-            propertiesPW.println( "eversion=" + major + "." + minor );
+            propertiesPW.println( "eversion=" + versionID.getBranchName() );
             propertiesPW.println( "beta=" + versionID.isBeta() );
-            propertiesPW.println( "copyright.comment=Copyright 1997, " + getCurrentYear() + " The Apache Software Foundation or its licensors, as applicable." );
+            propertiesPW.println( "copyright.comment=Copyright 1997, " + currentYear + " The Apache Software Foundation or its licensors, as applicable." );
             propertiesPW.println( "vendor=The Apache Software Foundation" ) ;
+            propertiesPW.println( "copyright.year=" + currentYear ) ;
+            propertiesPW.println( "release.id.long=" + versionID.toString() ) ;
 
-            setProperty( "derby.release.id.new", versionID.toString() );
+            setProperty( NEW_RELEASE_ID, versionID.toString() );
         }
         catch (Exception e)
         {
@@ -265,6 +278,8 @@ public class ReleaseProperties extends T
         public int getPoint() { return _point; }
         public boolean isBeta() { return _isBeta; }
 
+        public String getBranchName() { return Integer.toString( _major ) + '.' + Integer.toString( _minor ); }
+
         public String toString()
         {
             StringBuffer buffer = new StringBuffer();