david_williams | 0c366d3 | 2006-12-10 07:08:39 +0000 | [diff] [blame] | 1 | <project name="Publish Build" default="default" basedir="."> |
| 2 | |
| 3 | <!-- Properties that must be passed to this script: |
| 4 | buildDirectory: Path to perform the build in. (A working directory) |
| 5 | buildType: Type of build (nightly, integration etc.) |
| 6 | buildId: Build name |
| 7 | buildLabel: <buildType>-<buildName>-<timestamp> |
| 8 | --> |
| 9 | <property name="result" value="${buildDirectory}/${buildLabel}" /> |
| 10 | |
| 11 | <!--name of generated index page--> |
| 12 | <property name="indexFileName" value="index.php" /> |
| 13 | |
| 14 | <target name="default"> |
| 15 | <antcall target="countFiles" /> |
| 16 | <antcall target="generateIndex" /> |
| 17 | <antcall target="getStaticFiles" /> |
| 18 | </target> |
| 19 | |
| 20 | <target name="generateIndex"> |
| 21 | |
david_williams | 0c366d3 | 2006-12-10 07:08:39 +0000 | [diff] [blame] | 22 | <!-- |
| 23 | isBuildTested: true|false should JUnit plugin test results be used to generate index page |
| 24 | dropTokenList: comma separated list of strings which should be replaced by the fileName attribute settings in the testManifest.xml. |
| 25 | xmlDirectoryName: path to directory containing JUnit plugin test results in xml format (see doc is org.eclipse.test). |
| 26 | dropDirectoryName: path to directory containing the result of the build. |
| 27 | testResultsTemplateFileName: path to template file used to generate page with links to JUnit test results |
| 28 | testResultsHtmlFileName: name of file which will be generated with links to JUnit test results |
| 29 | dropHtmlFileName: name of generated index page |
| 30 | hrefTestResultsTargetPath: relative path from index page to directory containing JUnit html test results |
| 31 | hrefCompileLogsTargetPath: relative path from index page directory containing compilelogs |
| 32 | testManifestFileName: name of xml file containing descriptions of zip types and log files |
| 33 | |
| 34 | |
| 35 | |
| 36 | --> |
| 37 | <property file="${buildDirectory}/maps/releng/maps/dependencies.properties" /> |
| 38 | |
david_williams | 535d681 | 2007-03-29 06:46:26 +0000 | [diff] [blame] | 39 | <indexResults isBuildTested="${isBuildTested}" dropTokenList="${dropTokenList}" xmlDirectoryName="${result}/testResults/xml" dropDirectoryName="${result}" testResultsTemplateFileName="${basedir}/templateFiles/testResults.php.template" |
| 40 | testResultsHtmlFileName="testResults.php" dropHtmlFileName="${indexFileName}" hrefTestResultsTargetPath="testResults/html" hrefCompileLogsTargetPath="compilelogs" compileLogsDirectoryName="${result}/compilelogs" testManifestFileName="${basedir}/testManifest.xml" /> |
david_williams | 0c366d3 | 2006-12-10 07:08:39 +0000 | [diff] [blame] | 41 | |
| 42 | <tstamp> |
| 43 | <format property="TODAY" pattern="MMMM d, yyyy" /> |
| 44 | </tstamp> |
| 45 | |
| 46 | <!-- Insert Build Type descriptor --> |
| 47 | <antcall target="${buildType}" /> |
| 48 | |
| 49 | <!-- Insert Build Date --> |
| 50 | <replace file="${result}/${indexFileName}" token="@date@" value="${TODAY}" /> |
| 51 | |
| 52 | <!-- Insert Build Name --> |
| 53 | <replace file="${result}/${indexFileName}" token="@build@" value="${buildLabel}" /> |
| 54 | |
| 55 | <!-- Insert Mirror Name --> |
| 56 | <replace file="${result}/${indexFileName}" token="@mirror@" value="${webtoolsDownloadURL}/${buildBranch}/${buildLabel}/" /> |
| 57 | |
| 58 | <!-- Insert PreRequsites --> |
| 59 | |
| 60 | <replace file="${result}/${indexFileName}" token="@eclipseFile@" value="${eclipse.file.linux-gtk-x86}" /> |
| 61 | <replace file="${result}/${indexFileName}" token="@eclipseURL@" value="${eclipse.url}/${eclipse.file.linux-gtk-x86}" /> |
| 62 | <replace file="${result}/${indexFileName}" token="@eclipseBuildURL@" value="${eclipse.url}" /> |
| 63 | <replace file="${result}/${indexFileName}" token="@emfFile@" value="${emf.file}" /> |
| 64 | <replace file="${result}/${indexFileName}" token="@emfURL@" value="${emf.url}" /> |
| 65 | <replace file="${result}/${indexFileName}" token="@gefFile@" value="${gef.file}" /> |
| 66 | <replace file="${result}/${indexFileName}" token="@gefURL@" value="${gef.url}/${gef.file}" /> |
| 67 | <replace file="${result}/${indexFileName}" token="@jemFile@" value="${jem.file}" /> |
| 68 | <replace file="${result}/${indexFileName}" token="@jemURL@" value="${jem.url}/${jem.file}" /> |
| 69 | <mkdir dir="${result}/whatisfixed" /> |
| 70 | <echo file="${result}/whatisfixed/buglog.html" append="true" > |
| 71 | what is fixed list is not available yet! |
| 72 | </echo> |
| 73 | |
| 74 | |
| 75 | <!-- Update timestamp on file to permit overwrite through Ant copy task --> |
| 76 | <touch file="${result}/${indexFileName}" /> |
| 77 | </target> |
| 78 | |
| 79 | |
| 80 | <target name="getStaticFiles"> |
| 81 | <!--get static files required in the buildLabel directory--> |
| 82 | <copy todir="${result}"> |
| 83 | <fileset dir="${basedir}/staticDropFiles" /> |
| 84 | </copy> |
| 85 | |
| 86 | <!--copy buildnotes from plugin and feature directories--> |
| 87 | <mkdir dir="${result}/buildnotes" /> |
| 88 | <copy todir="${result}/buildnotes" flatten="true"> |
| 89 | <fileset dir="${buildDirectory}/plugins" includes="**/buildnotes_*.html" /> |
| 90 | </copy> |
| 91 | <copy todir="${result}/buildnotes" flatten="true"> |
| 92 | <fileset dir="${buildDirectory}/features" includes="**/buildnotes_*.html" /> |
| 93 | </copy> |
| 94 | </target> |
| 95 | |
| 96 | <target name="countFiles"> |
| 97 | <!-- files.count is a file that should exist in the drop directory with a count of the zip files in the same directory. |
| 98 | It is required to generate a link to the build on the downloads page. |
| 99 | Added remove .zip.MD5 - old files before a count |
| 100 | --> |
| 101 | <delete> |
| 102 | <fileset dir="${result}" id="id"> |
| 103 | <include name="*.MD5" /> |
| 104 | </fileset> |
| 105 | </delete> |
| 106 | |
david_williams | 3935405 | 2007-04-09 05:38:44 +0000 | [diff] [blame] | 107 | <countBuildFiles sourceDirectory="${result}" filterString=".zip,.tar.gz" outputFile="${result}/files.count" /> |
david_williams | 0c366d3 | 2006-12-10 07:08:39 +0000 | [diff] [blame] | 108 | |
| 109 | </target> |
| 110 | |
| 111 | <!--Build type descriptors--> |
| 112 | <target name="I"> |
| 113 | <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" " /> |
| 114 | <replace file="${result}/${indexFileName}" token="@type@" value="Integration" /> |
| 115 | </target> |
| 116 | |
| 117 | <target name="S"> |
| 118 | <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" " /> |
| 119 | <replace file="${result}/${indexFileName}" token="@type@" value="Stable" /> |
| 120 | </target> |
| 121 | |
| 122 | <target name="N"> |
| 123 | <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" " /> |
| 124 | <replace file="${result}/${indexFileName}" token="@type@" value="Nightly" /> |
| 125 | </target> |
| 126 | |
| 127 | <target name="M"> |
| 128 | <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" " /> |
| 129 | <replace file="${result}/${indexFileName}" token="@type@" value="Maintenance" /> |
| 130 | </target> |
| 131 | |
| 132 | <target name="P"> |
| 133 | <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" " /> |
| 134 | <replace file="${result}/${indexFileName}" token="@type@" value="Patch " /> |
| 135 | </target> |
| 136 | |
| 137 | <target name="R"> |
| 138 | <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" " /> |
| 139 | <replace file="${result}/${indexFileName}" token="@type@" value="Release" /> |
| 140 | </target> |
| 141 | |
| 142 | |
| 143 | <target name="T"> |
| 144 | <replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" " /> |
| 145 | <replace file="${result}/${indexFileName}" token="@type@" value="Test" /> |
| 146 | </target> |
| 147 | |
| 148 | </project> |