blob: acf5beb32148833e13397ed6f8e70620af065f59 [file] [log] [blame]
ndai91f5c9b2006-03-12 13:56:45 +00001<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
ndai91f5c9b2006-03-12 13:56:45 +000022 <!--
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_williams535d6812007-03-29 06:46:26 +000039 <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" />
ndai91f5c9b2006-03-12 13:56:45 +000041
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 -->
ndai8ab09532006-03-29 08:48:53 +000056 <replace file="${result}/${indexFileName}" token="@mirror@" value="${daliDownloadURL}/${buildLabel}/" />
ndai91f5c9b2006-03-12 13:56:45 +000057
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_williamse2ba50d2006-12-14 20:14:05 +000064 <replace file="${result}/${indexFileName}" token="@emfURL@" value="${emf.url}/${emf.file}" />
ndai91f5c9b2006-03-12 13:56:45 +000065 <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_williamsae0e4cb2006-11-11 02:55:51 +000069 <replace file="${result}/${indexFileName}" token="@dtpFile@" value="${dtp.file}" />
70 <replace file="${result}/${indexFileName}" token="@dtpURL@" value="${dtp.url}/${dtp.file}" />
ndai91f5c9b2006-03-12 13:56:45 +000071
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_williams39354052007-04-09 05:38:44 +0000102 <countBuildFiles sourceDirectory="${result}" filterString=".zip,.tar.gz" outputFile="${result}/files.count" />
ndai91f5c9b2006-03-12 13:56:45 +0000103
104 </target>
105
106 <!--Build type descriptors-->
107 <target name="I">
ndai91f5c9b2006-03-12 13:56:45 +0000108 <replace file="${result}/${indexFileName}" token="@type@" value="Integration" />
109 </target>
110
111 <target name="S">
ndai91f5c9b2006-03-12 13:56:45 +0000112 <replace file="${result}/${indexFileName}" token="@type@" value="Stable" />
113 </target>
114
115 <target name="N">
ndai91f5c9b2006-03-12 13:56:45 +0000116 <replace file="${result}/${indexFileName}" token="@type@" value="Nightly" />
117 </target>
118
119 <target name="M">
ndai91f5c9b2006-03-12 13:56:45 +0000120 <replace file="${result}/${indexFileName}" token="@type@" value="Maintenance" />
121 </target>
122
123 <target name="R">
ndai91f5c9b2006-03-12 13:56:45 +0000124 <replace file="${result}/${indexFileName}" token="@type@" value="Release" />
125 </target>
126
ndai91f5c9b2006-03-12 13:56:45 +0000127 <target name="T">
ndai91f5c9b2006-03-12 13:56:45 +0000128 <replace file="${result}/${indexFileName}" token="@type@" value="Test" />
129 </target>
130
131</project>