david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 1 | <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 | |
| 19 | <!-- load standard properties for production environment --> |
| 20 | <property file="${env.STANDARD_PROPERTIES_DIR}/${ant.project.name}.properties" /> |
| 21 | <!-- = = = end standard properties pattern = = = --> |
| 22 | |
| 23 | |
| 24 | <!-- |
| 25 | If not set yet, by "caller", then we set checkoutprojectname here. |
| 26 | Normally this is literally the project name from CruiseControl, but |
| 27 | if running "standalone", we make this simplifying assumption. |
| 28 | --> |
david_williams | f52cb45 | 2006-11-29 03:36:45 +0000 | [diff] [blame^] | 29 | <property name="build.distribution" value="wtp" /> |
| 30 | <property name="buildBranch" value="R2.0" /> |
| 31 | <property name="buildType" value="I" /> |
david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 32 | <property name="checkoutprojectname" value="${build.distribution}-${buildBranch}-${buildType}" /> |
| 33 | |
| 34 | <target name="Build"> |
| 35 | |
| 36 | <!-- set main builder file name, based on distribution, buildBranch and build type --> |
| 37 | <property name="wtpBuilder" |
| 38 | value="${env.BUILD_HOME}/build-node/checkout/${checkoutprojectname}/releng.wtpbuilder/build.xml" /> |
| 39 | |
| 40 | |
| 41 | |
| 42 | <!-- clean previous build --> |
| 43 | <antcall target="clean" /> |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | <!-- check out fresh set of appropriate files --> |
| 49 | <!-- this is to make sure maps and builders are correct, but also to |
| 50 | make sure the cruisecontrol triggered "diffs" are accurate next |
| 51 | time around --> |
| 52 | <ant antfile="checkout.xml"> |
| 53 | <property name="checkoutprojectname" value="${checkoutprojectname}"/> |
| 54 | |
| 55 | </ant> |
| 56 | |
| 57 | |
| 58 | |
| 59 | <!-- build and create preliminary download site files --> |
| 60 | <ant antfile="${wtpBuilder}" target="build"> |
| 61 | |
| 62 | </ant> |
| 63 | |
| 64 | <ant antfile="${wtpBuilder}" target="site" /> |
| 65 | |
| 66 | <!-- upload what we have so far --> |
| 67 | <ant antfile="${wtpBuilder}" target="upload" /> |
| 68 | |
| 69 | |
| 70 | <!-- test and create test summary files --> |
| 71 | <ant antfile="${wtpBuilder}" target="test" /> |
| 72 | |
| 73 | <ant antfile="${wtpBuilder}" target="site" /> |
| 74 | <!-- upload what we have so far --> |
| 75 | <ant antfile="${wtpBuilder}" target="upload" /> |
| 76 | |
| 77 | </target> |
| 78 | |
| 79 | |
| 80 | |
| 81 | <target name="clean" depends="check.clean" if="doClean"> |
| 82 | <delete dir="${env.BUILD_HOME}/build-${checkoutprojectname}" |
| 83 | failonerror="false" /> |
| 84 | <delete dir="${env.BUILD_HOME}/test-${checkoutprojectname}" |
| 85 | failonerror="false" /> |
| 86 | </target> |
| 87 | |
| 88 | |
| 89 | <target name="check.clean"> |
| 90 | <condition property="doClean"> |
| 91 | <equals arg1="${build.clean}" arg2="true" /> |
| 92 | </condition> |
| 93 | </target> |
| 94 | |
| 95 | |
| 96 | </project> |