Automated a few manual steps when creating a new Ivy release.
authorMaarten Coene <maartenc@apache.org>
Tue, 30 Jun 2009 22:47:27 +0000 (22:47 +0000)
committerMaarten Coene <maartenc@apache.org>
Tue, 30 Jun 2009 22:47:27 +0000 (22:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@789997 13f79535-47bb-0310-9956-ffa450edef68

build-release.xml
doc/dev/makerelease.html
doc/printTemplate.html
doc/template.html

index 81a77a5..8fd1757 100644 (file)
                xmlns:openpgp="antlib:org.apache.commons.openpgp.ant">
        <import file="build.xml"/>
        
-       <target name="generate-doc">
-               <taskdef uri="antlib:xooki" file="${doc.src.dir}/xooki/antlib.xml" />
-
+       <target name="generate-doc" depends="release-version">
+               <!-- copy documentation to temp dir to replace version tokens -->
+               <property name="doc.tmp.dir" value="${build.dir}/tempdoc" />
+               <mkdir dir="${doc.tmp.dir}" />
+               <copy todir="${doc.tmp.dir}" preservelastmodified="true" overwrite="true">
+                       <fileset dir="${doc.src.dir}" />
+                   <filterset>
+                     <filter token="version" value="${build.version}"/>
+                   </filterset>
+               </copy>         
+               
         <copy todir="${doc.build.dir}">
                <fileset dir="${doc.src.dir}" includes="images/**,style/**,samples/**,js/**,ivy.xsd" />
         </copy>
+
                <!-- requires java 6 jdk in path and Apache Ant 1.7 -->
+        <taskdef uri="antlib:xooki" file="${doc.src.dir}/xooki/antlib.xml" />
         <xooki:generate destDir="${doc.build.dir}" checkUpToDate="true">
-                       <fileset dir="${doc.src.dir}">
+                       <fileset dir="${doc.tmp.dir}">
                            <include name="**/*.html"/>
                            <exclude name="template.html"/>
                            <exclude name="*Template.html"/>
                            <exclude name="xooki/**"/>
                        </fileset>
                </xooki:generate>
+
+               <!-- generate print-friendly doc -->
+               <!-- modify the basedir because othwise xooki.js will not be found! --> 
+               <ant antfile="../build-release.xml" target="generate-print-doc" dir="doc" />
+    </target>
+       
+       <target name="generate-print-doc">
+        <!-- requires java 6 jdk in path and Apache Ant 1.7 -->
+        <taskdef uri="antlib:xooki" file="${doc.src.dir}/xooki/antlib.xml" />
+        <xooki:print src="${doc.tmp.dir}/index.html" 
+                     dest="${doc.build.dir}/book.html" />
        </target>
 
        <target name="all-doc" depends="javadoc, generate-doc" />
index b409fd9..90fc87d 100644 (file)
@@ -46,24 +46,8 @@ svn copy https://svn.apache.org/repos/asf/ant/ivy/core/trunk \
 <code>
 svn co https://svn.apache.org/repos/asf/ant/ivy/core/branches/2.0.0-beta1 ivy-2.0.0-beta1
 </code>
-<h3>4. Prepare the files which need to be updated for the release.</h3>
-Check again that files have proper revision information.
-It's also time to update the documentation template files which will be used for doc generation to include the version information in the page title.
-For instance in
-<code>
-doc/template.html
-doc/printTemplate.html
-</code>
-replace
-<code>
-<title>${title} | Ivy Documentation</title>
-</code>
-by
-<code>
-<title>${title} | Ivy 2.0.0-beta1 Documentation</title>
-</code>
-
-You also need to store the current ivy xml schema in the documentation, so that it will later be accessible on public web site. To do so, run the following command in the directory in which you checked out the release branch:
+<h3>4. Add Ivy xsd file.</h3>
+You need to store the current ivy xml schema in the documentation, so that it will later be accessible on public web site. To do so, run the following command in the directory in which you checked out the release branch:
 <code>
 ant -f build-release.xml release-xsd
 </code>
index 3d93bcc..ebedf9a 100644 (file)
@@ -20,7 +20,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
-<title>${title} | Ivy</title>
+<title>${title} | Ivy @version@</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <link rel="stylesheet" type="text/css" href="style/print-style.css" />
 </head>
@@ -32,9 +32,9 @@
 <table id="header" summary="Navigation elements." border="0"
        cellpadding="0" cellspacing="0" width="100%">
        <tr>
-               <td id="home" width="30%"><a href="http://incubator.apache.org/"
-                       title="Home"><img src="images/apache-incubator-logo.png" alt="Apache Incubator"
-                       border="0" /></a></td>
+        <td id="home" width="30%"><a href="http://ant.apache.org/"
+            title="Apache Ant"><img src="images/ant-group-logo.gif" alt="Apache Ant"
+            border="0" /></a></td>
 
                <td class="product" width="70%" align="right" valign="middle"><img
                        src="images/logo.png" alt="ivy" border="0" /></td>
index b77a86a..31a2151 100644 (file)
@@ -20,7 +20,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
-<title>${title} | Ivy Documentation</title>
+<title>${title} | Ivy @version@ Documentation</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <link rel="stylesheet" type="text/css" href="style/style.css" />
   <script src="js/jquery.pack.js" type="text/javascript"></script>