blob: 9726b911ccd317516a73298c4f6c5feabbe01b52 [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
david_williamsab2477b2008-06-23 00:46:05 +000040 file="${env.ANT_WORKING}/${projectname}/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_williams39c5f652008-01-02 07:08:39 +000049 <property
50 name="labelfile"
51 value="${env.PROJECT_PROJECTS}/${projectname}/workdir/label.properties" />
52 <available
53 file="${labelfile}"
54 property="labelfileavailable" />
55 <fail
56 unless="labelfileavailable" />
57 <property
58 file="${labelfile}" />
59 <property
60 name="localStampedArtifactsDirectory"
61 value="${localArtifactsDirectory}/${cctimestamp}" />
david_williamsece24db2008-03-23 05:45:29 +000062 <fail
63 message="Build probably failed early. Found nothing to copy at ${env.PROJECT_PROJECTS}/${projectname}/workdir/${buildLabel}">
64 <condition>
65 <not>
66 <available
67 file="${env.PROJECT_PROJECTS}/${projectname}/workdir/${buildLabel}" />
68 </not>
69 </condition>
70 </fail>
david_williamsb96b6732007-09-20 21:49:28 +000071 </target>
david_williams39c5f652008-01-02 07:08:39 +000072</project>