| <project name="Publish Build" default="default"> |
| |
| <!-- Properties that must be passed to this script: |
| buildDirectory: Path to perform the build in. (A working directory) |
| buildType: Type of build (nightly, integration etc.) |
| buildId: Build name |
| buildLabel: <buildType>-<buildName>-<timestamp> |
| --> |
| <property name="result" value="${buildDirectory}/${buildLabel}" /> |
| <property file="maps/build.cfg"/> |
| |
| <!--name of generated index page--> |
| <property name="indexFileName" value="index.php" /> |
| |
| <target name="default"> |
| <antcall target="countFiles" /> |
| <antcall target="generateIndex" /> |
| <antcall target="getStaticFiles" /> |
| </target> |
| |
| <target name="generateIndex"> |
| |
| <property name="class" value="org.eclipse.releng.generators.TestResultsGenerator" /> |
| <taskdef name="indexResults" classname="${class}" /> |
| |
| <!-- |
| isBuildTested: true|false should JUnit plugin test results be used to generate index page |
| dropTokenList: comma separated list of strings which should be replaced by the fileName attribute settings in the testManifest.xml. |
| xmlDirectoryName: path to directory containing JUnit plugin test results in xml format (see doc is org.eclipse.test). |
| dropDirectoryName: path to directory containing the result of the build. |
| testResultsTemplateFileName: path to template file used to generate page with links to JUnit test results |
| testResultsHtmlFileName: name of file which will be generated with links to JUnit test results |
| dropHtmlFileName: name of generated index page |
| hrefTestResultsTargetPath: relative path from index page to directory containing JUnit html test results |
| hrefCompileLogsTargetPath: relative path from index page directory containing compilelogs |
| testManifestFileName: name of xml file containing descriptions of zip types and log files |
| |
| |
| |
| --> |
| <indexResults |
| isBuildTested="${isBuildTested}" |
| dropTokenList="${dropTokenList}" |
| xmlDirectoryName="${result}/testResults/xml" |
| dropDirectoryName="${result}" |
| testResultsTemplateFileName="${basedir}/templateFiles/testResults.php.template" |
| dropTemplateFileName="${basedir}/templateFiles/${indexTemplateFilename}" |
| testResultsHtmlFileName="testResults.php" |
| dropHtmlFileName="${indexFileName}" |
| hrefTestResultsTargetPath="testResults/html" |
| hrefCompileLogsTargetPath="compilelogs" |
| compileLogsDirectoryName="${result}/compilelogs" |
| testManifestFileName="${basedir}/testManifest.xml" |
| /> |
| |
| <tstamp> |
| <format property="TODAY" pattern="MMMM d, yyyy"/> |
| </tstamp> |
| |
| <!-- Insert Build Type descriptor --> |
| <antcall target="${buildType}" /> |
| |
| <!-- Insert Build Date --> |
| <replace file="${result}/${indexFileName}" token="@date@" value="${TODAY}"/> |
| |
| <!-- Insert Build Name --> |
| <replace file="${result}/${indexFileName}" token="@build@" value="${buildId}"/> |
| |
| <!-- Insert Mirror Name --> |
| <replace file="${result}/${indexFileName}" token="@mirror@" value="${webtoolsDownloadURL}/${buildLabel}/"/> |
| |
| <!-- Insert PreRequsites --> |
| |
| <replace file="${result}/${indexFileName}" token="@eclipseFile@" value="${eclipseFile}"/> |
| <replace file="${result}/${indexFileName}" token="@eclipseURL@" value="${eclipseURL}"/> |
| <replace file="${result}/${indexFileName}" token="@eclipseBuildURL@" value="${eclipseBuildURL}"/> |
| <replace file="${result}/${indexFileName}" token="@emfFile@" value="${emfFile}"/> |
| <replace file="${result}/${indexFileName}" token="@emfURL@" value="${emfURL}"/> |
| <replace file="${result}/${indexFileName}" token="@gefFile@" value="${gefFile}"/> |
| <replace file="${result}/${indexFileName}" token="@gefURL@" value="${gefURL}"/> |
| <replace file="${result}/${indexFileName}" token="@jemFile@" value="${jemFile}"/> |
| <replace file="${result}/${indexFileName}" token="@jemURL@" value="${jemURL}"/> |
| |
| |
| <!-- Update timestamp on file to permit overwrite through Ant copy task --> |
| <touch file="${result}/${indexFileName}" /> |
| </target> |
| |
| |
| <target name="getStaticFiles"> |
| <!--get static files required in the buildLabel directory--> |
| <copy todir="${result}"> |
| <fileset dir="staticDropFiles" /> |
| </copy> |
| |
| <!--copy buildnotes from plugin directories--> |
| <mkdir dir="${result}/buildnotes" /> |
| <copy todir="${result}/buildnotes" flatten="true"> |
| <fileset dir="${buildDirectory}/plugins" includes="**/buildnotes_*.html" /> |
| </copy> |
| </target> |
| |
| <target name="countFiles"> |
| <!-- files.count is a file that should exist in the drop directory with a count of the zip files in the same directory. |
| It is required to generate a link to the build on the downloads page. |
| Added remove .zip.MD5 - old files before a count |
| --> |
| <delete> |
| <fileset dir="${result}" id="id"> |
| <include name="*.MD5" /> |
| </fileset> |
| </delete> |
| |
| <taskdef name="countFiles" classname="org.eclipse.releng.generators.FileCounter" /> |
| |
| <countFiles |
| sourceDirectory="${result}" |
| filterString=".zip,.tar.gz" |
| outputFile="${result}/files.count" |
| /> |
| |
| </target> |
| |
| <!--Build type descriptors--> |
| <target name="I"> |
| <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" "/> |
| <replace file="${result}/${indexFileName}" token="@type@" value="Integration"/> |
| </target> |
| |
| <target name="N"> |
| <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" "/> |
| <replace file="${result}/${indexFileName}" token="@type@" value="Nightly"/> |
| </target> |
| |
| <target name="M"> |
| <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" "/> |
| <replace file="${result}/${indexFileName}" token="@type@" value="Maintenance"/> |
| </target> |
| |
| <target name="R"> |
| <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" "/> |
| <replace file="${result}/${indexFileName}" token="@type@" value="Release"/> |
| </target> |
| |
| <target name="S"> |
| <replace file="${result}/${indexFileName}"> |
| <replacetoken><![CDATA[%wtpandprereqs%]]></replacetoken> |
| <replacevalue><![CDATA[ |
| |
| <table border=0 cellspacing=2 cellpadding=0 width="100%" bordercolor="#999999" > |
| <tr><td align=RIGHT valign=TOP width="7%"> |
| <div align="left"><b>Status</b></div></td> |
| <td width="34%"><b>Platform</b></td> |
| <td width="59%"><b>Download</b></td></tr> |
| <tr> |
| <td><div align=left><img src = "OK.gif" width=19 height=23></div></td> |
| <td>Windows</td> |
| <td><a href="http://www.eclipse.org/downloads/download.php?file=/webtools/downloads/drops/@buildLabel@/wtp-eclipse-prereqs-sdk-@buildId@-win32.zip">wtp-eclipse-prereqs-sdk-@buildId@-win32.zip</a> (WTP+Eclipse+EMF+GEF+JEM+Xerces) <font size="2"></font></td> |
| </tr> |
| </table> |
| <table border=0 cellspacing=5 cellpadding=2 width="100%" ><tr><td colspan="2"> </td></tr></table> |
| |
| <table border=0 cellspacing=2 cellpadding=0 width="100%" bordercolor="#999999" > |
| <tr><td align=RIGHT valign=TOP width="7%"> |
| <div align="left"><b>Status</b></div></td> |
| <td width="34%"><b>Platform</b></td> |
| <td width="59%"><b>Download</b></td></tr> |
| <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td> |
| <td>All</td> |
| <td><a href="http://www.eclipse.org/downloads/download.php?file=/webtools/downloads/drops/@buildLabel@/wtp-prereqs-sdk-@buildId@.zip">wtp-prereqs-sdk-@buildId@.zip</a> (WTP+EMF+GEF+JEM+Xerces) <font size="2"></font></td> |
| </tr> |
| </table> |
| <table border=0 cellspacing=5 cellpadding=2 width="100%" ><tr><td colspan="2"> </td></tr></table> |
| |
| ]]></replacevalue> |
| </replace> |
| <replace file="${result}/${indexFileName}" token="@buildLabel@" value="${buildLabel}"/> |
| <replace file="${result}/${indexFileName}" token="@buildId@" value="${buildId}"/> |
| <replace file="${result}/${indexFileName}" token="@type@" value="Stable"/> |
| </target> |
| |
| <target name="T"> |
| <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" "/> |
| <replace file="${result}/${indexFileName}" token="@type@" value="Test"/> |
| </target> |
| |
| </project> |