blob: c445ae5df345ee8fdb9e1cb5b61ce3a84cacea42 [file] [log] [blame]
david_williamsa7f68be2007-06-20 02:17:13 +00001<project name="cc_project_build" default="Build" basedir=".">
2
3
4 <!-- = = = standard properties pattern = = = -->
5 <!--
6 Note to be cross-platform, "environment variables" are only appropriate for
7 some variables, e.g. ones we set, since properties are case sensitive, even if
8 the environment variables on your operating system are not, e.g. it will
9 be ${env.Path} not ${env.PATH} on Windows -->
10 <property environment="env" />
11
12 <!--
13 Let users override standard properties, if desired.
14 If directory, file, or some properties do not exist,
15 then standard properties will be used.
16 -->
17 <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
18
david_williamsa7f68be2007-06-20 02:17:13 +000019 <!-- = = = end standard properties pattern = = = -->
20
21
22 <!--
23 If not set yet, by "caller", then we set checkoutprojectname here.
24 Normally this is literally the project name from CruiseControl, but
25 if running "standalone", we make this simplifying assumption.
26 -->
27 <property name="build.distribution" value="wtp" />
david_williams59811402007-06-30 18:51:11 +000028 <property name="buildBranch" value="R3.0" />
david_williamsa7f68be2007-06-20 02:17:13 +000029 <property name="buildType" value="I" />
30 <property name="checkoutprojectname" value="${build.distribution}-${buildBranch}-${buildType}" />
31
32 <target name="Build">
33
34 <!-- set main builder file name, based on distribution, buildBranch and build type -->
35 <property name="wtpBuilder"
david_williams8f1cae12007-11-17 02:07:46 +000036 value="${env.BUILD_HOME}/projectBuilders/${checkoutprojectname}/${env.RELENGWTPBUILDER}/build.xml" />
david_williamsa7f68be2007-06-20 02:17:13 +000037
38
39
40 <!-- do not clean previous build for re-rest
41 <antcall target="clean" />
42 -->
43
44
45
46 <!-- check out fresh set of appropriate files -->
47 <!-- this is to make sure maps and builders are correct, but also to
48 make sure the cruisecontrol triggered "diffs" are accurate next
49 time around -->
50
51 <!-- do need to checkout builders for just re-test since stored in "retest-wtp" directory -->
52 <ant antfile="checkout.xml">
53 <property name="checkoutprojectname" value="${checkoutprojectname}"/>
54 </ant>
55
56
57 <!-- no need to build, create site, or do initial upload for re-test -->
58 <!-- build and create preliminary download site files -->
59
60 <!-- <ant antfile="${wtpBuilder}" target="build" /> -->
61
62 <!-- <ant antfile="${wtpBuilder}" target="site" /> -->
63
64 <!-- upload what we have so far -->
65 <!-- <ant antfile="${wtpBuilder}" target="upload" /> -->
66
67
68 <!-- test and create test summary files -->
69 <ant antfile="${wtpBuilder}" target="test" />
70
71 <ant antfile="${wtpBuilder}" target="site" />
72 <!-- upload what we have so far -->
73 <ant antfile="${wtpBuilder}" target="upload" />
74
75 </target>
76
77
78
79 <target name="clean" depends="check.clean" if="doClean">
david_williamsaeed97b2007-08-20 08:18:09 +000080 <delete dir="${env.BUILD_HOME}/projects/${checkoutprojectname}"
david_williamsa7f68be2007-06-20 02:17:13 +000081 failonerror="false" />
david_williamsaeed97b2007-08-20 08:18:09 +000082 <delete dir="${env.BUILD_HOME}/tests/${checkoutprojectname}"
david_williamsa7f68be2007-06-20 02:17:13 +000083 failonerror="false" />
84 </target>
85
86
87 <target name="check.clean">
88 <condition property="doClean">
89 <equals arg1="${build.clean}" arg2="true" />
90 </condition>
91 </target>
92
93
94</project>