ndai | 91f5c9b | 2006-03-12 13:56:45 +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 | |
ndai | 91f5c9b | 2006-03-12 13:56:45 +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" /> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +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 --> |
ndai | 8ab0953 | 2006-03-29 08:48:53 +0000 | [diff] [blame] | 56 | <replace file="${result}/${indexFileName}" token="@mirror@" value="${daliDownloadURL}/${buildLabel}/" /> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 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}" /> |
david_williams | e2ba50d | 2006-12-14 20:14:05 +0000 | [diff] [blame] | 64 | <replace file="${result}/${indexFileName}" token="@emfURL@" value="${emf.url}/${emf.file}" /> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 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}" /> |
david_williams | ae0e4cb | 2006-11-11 02:55:51 +0000 | [diff] [blame] | 69 | <replace file="${result}/${indexFileName}" token="@dtpFile@" value="${dtp.file}" /> |
| 70 | <replace file="${result}/${indexFileName}" token="@dtpURL@" value="${dtp.url}/${dtp.file}" /> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 71 | |
| 72 | |
| 73 | <!-- Update timestamp on file to permit overwrite through Ant copy task --> |
| 74 | <touch file="${result}/${indexFileName}" /> |
| 75 | </target> |
| 76 | |
| 77 | |
| 78 | <target name="getStaticFiles"> |
| 79 | <!--get static files required in the buildLabel directory--> |
| 80 | <copy todir="${result}"> |
| 81 | <fileset dir="${basedir}/staticDropFiles" /> |
| 82 | </copy> |
| 83 | |
| 84 | <!--copy buildnotes from plugin directories--> |
| 85 | <mkdir dir="${result}/buildnotes" /> |
| 86 | <copy todir="${result}/buildnotes" flatten="true"> |
| 87 | <fileset dir="${buildDirectory}/plugins" includes="**/buildnotes_*.html" /> |
| 88 | </copy> |
| 89 | </target> |
| 90 | |
| 91 | <target name="countFiles"> |
| 92 | <!-- files.count is a file that should exist in the drop directory with a count of the zip files in the same directory. |
| 93 | It is required to generate a link to the build on the downloads page. |
| 94 | Added remove .zip.MD5 - old files before a count |
| 95 | --> |
| 96 | <delete> |
| 97 | <fileset dir="${result}" id="id"> |
| 98 | <include name="*.MD5" /> |
| 99 | </fileset> |
| 100 | </delete> |
| 101 | |
david_williams | 3935405 | 2007-04-09 05:38:44 +0000 | [diff] [blame] | 102 | <countBuildFiles sourceDirectory="${result}" filterString=".zip,.tar.gz" outputFile="${result}/files.count" /> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 103 | |
| 104 | </target> |
| 105 | |
| 106 | <!--Build type descriptors--> |
| 107 | <target name="I"> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 108 | <replace file="${result}/${indexFileName}" token="@type@" value="Integration" /> |
| 109 | </target> |
| 110 | |
| 111 | <target name="S"> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 112 | <replace file="${result}/${indexFileName}" token="@type@" value="Stable" /> |
| 113 | </target> |
| 114 | |
| 115 | <target name="N"> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 116 | <replace file="${result}/${indexFileName}" token="@type@" value="Nightly" /> |
| 117 | </target> |
| 118 | |
| 119 | <target name="M"> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 120 | <replace file="${result}/${indexFileName}" token="@type@" value="Maintenance" /> |
| 121 | </target> |
| 122 | |
| 123 | <target name="R"> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 124 | <replace file="${result}/${indexFileName}" token="@type@" value="Release" /> |
| 125 | </target> |
| 126 | |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 127 | <target name="T"> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 128 | <replace file="${result}/${indexFileName}" token="@type@" value="Test" /> |
| 129 | </target> |
| 130 | |
| 131 | </project> |