blob: d4e501d5482b37e86d1a0132e56ccdd9fd3323e4 [file] [log] [blame]
david_williams39c5f652008-01-02 07:08:39 +00001<project
2 name="cc_copyArtifacts"
3 default="copyArtifacts"
4 basedir=".">
david_williams1cc549d2007-08-29 01:28:19 +00005
6
david_williamsaf61cb82008-01-11 12:47:46 +00007 <!-- = = = standard properties pattern = = = -->
8 <!--
david_williams1cc549d2007-08-29 01:28:19 +00009 Note to be cross-platform, "environment variables" are only appropriate for
10 some variables, e.g. ones we set, since properties are case sensitive, even if
11 the environment variables on your operating system are not, e.g. it will
12 be ${env.Path} not ${env.PATH} on Windows -->
david_williams39c5f652008-01-02 07:08:39 +000013 <property
14 environment="env" />
david_williams1cc549d2007-08-29 01:28:19 +000015
david_williamsaf61cb82008-01-11 12:47:46 +000016 <!--
david_williams1cc549d2007-08-29 01:28:19 +000017 Let users override standard properties, if desired.
18 If directory, file, or some properties do not exist,
19 then standard properties will be used.
20 -->
david_williams39c5f652008-01-02 07:08:39 +000021 <property
22 file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
david_williams1cc549d2007-08-29 01:28:19 +000023
david_williamsaf61cb82008-01-11 12:47:46 +000024 <!-- = = = end standard properties pattern = = = -->
25 <target
david_williams39c5f652008-01-02 07:08:39 +000026 name="copyArtifacts"
27 depends="init"
28 if="buildLabel">
29 <mkdir
30 dir="${localStampedArtifactsDirectory}" />
31 <mkdir
32 dir="${localStampedArtifactsDirectory}/${buildLabel}" />
33 <copy
34 todir="${localStampedArtifactsDirectory}/${buildLabel}"
david_williamsaf61cb82008-01-11 12:47:46 +000035 overwrite="true"
36 failonerror="false">
david_williams39c5f652008-01-02 07:08:39 +000037 <fileset
38 dir="${env.PROJECT_PROJECTS}/${projectname}/workdir/${buildLabel}" />
david_williamsaf61cb82008-01-11 12:47:46 +000039 <fileset
40 file="${env.ANT_WORKING}/antBuilderOutput.log" />
david_williamsb96b6732007-09-20 21:49:28 +000041 </copy>
42 </target>
david_williams39c5f652008-01-02 07:08:39 +000043 <target
44 name="init">
david_williamsaf61cb82008-01-11 12:47:46 +000045 <fail
46 unless="env.PROJECT_PROJECTS" />
47 <fail
48 unless="projectname" />
david_williams854550c2008-03-20 06:50:08 +000049 <fail
50 message="Nothing to copy. Build failed earlier.">
51 <condition>
52 <not>
david_williamsf2cf08b2008-03-20 06:58:42 +000053 <available
54 file="${env.PROJECT_PROJECTS}/${projectname}/workdir/${buildLabel}" />
david_williams854550c2008-03-20 06:50:08 +000055 </not>
56 </condition>
57 </fail>
david_williams39c5f652008-01-02 07:08:39 +000058 <property
59 name="labelfile"
60 value="${env.PROJECT_PROJECTS}/${projectname}/workdir/label.properties" />
61 <available
62 file="${labelfile}"
63 property="labelfileavailable" />
64 <fail
65 unless="labelfileavailable" />
66 <property
67 file="${labelfile}" />
68 <property
69 name="localStampedArtifactsDirectory"
70 value="${localArtifactsDirectory}/${cctimestamp}" />
david_williamsb96b6732007-09-20 21:49:28 +000071 </target>
david_williams39c5f652008-01-02 07:08:39 +000072</project>