blob: 1775f6208236f7c461d7df5624fc6c36b6e09738 [file] [log] [blame]
david_williams39c5f652008-01-02 07:08:39 +00001<project
2 name="cc_copyArtifacts"
3 default="copyArtifacts"
4 basedir=".">
david_williamsc2f548c2008-07-21 04:06:47 +00005 <!--
6 Standard properties pattern. Note: to be cross-platform,
7 "environment variables" are only appropriate for some variables,
8 e.g. ones we set, since properties are case sensitive, even if
9 the environment variables on your operating system are not, e.g.
10 it will be ${env.Path} not ${env.PATH} on Windows
11 -->
david_williams39c5f652008-01-02 07:08:39 +000012 <property
david_williamsc2f548c2008-07-21 04:06:47 +000013 environment="env"/>
14 <!--
15 Let users override standard properties, if desired. If
16 directory, file, or some properties do not exist, then standard
17 properties will be used.
18 -->
david_williams39c5f652008-01-02 07:08:39 +000019 <property
david_williamsc2f548c2008-07-21 04:06:47 +000020 file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/>
david_williams1cc549d2007-08-29 01:28:19 +000021
david_williamsaf61cb82008-01-11 12:47:46 +000022 <!-- = = = end standard properties pattern = = = -->
23 <target
david_williams39c5f652008-01-02 07:08:39 +000024 name="copyArtifacts"
25 depends="init"
26 if="buildLabel">
27 <mkdir
david_williamsc2f548c2008-07-21 04:06:47 +000028 dir="${localStampedArtifactsDirectory}"/>
david_williams39c5f652008-01-02 07:08:39 +000029 <mkdir
david_williamsc2f548c2008-07-21 04:06:47 +000030 dir="${localStampedArtifactsDirectory}/${buildLabel}"/>
david_williams39c5f652008-01-02 07:08:39 +000031 <copy
32 todir="${localStampedArtifactsDirectory}/${buildLabel}"
david_williamsaf61cb82008-01-11 12:47:46 +000033 overwrite="true"
34 failonerror="false">
david_williams39c5f652008-01-02 07:08:39 +000035 <fileset
david_williamsc2f548c2008-07-21 04:06:47 +000036 dir="${env.PROJECT_PROJECTS}/${projectname}/workdir/${buildLabel}"/>
david_williamsaf61cb82008-01-11 12:47:46 +000037 <fileset
david_williamsc2f548c2008-07-21 04:06:47 +000038 file="${env.ANT_WORKING}/${projectname}/antBuilderOutput.log"/>
david_williamsb96b6732007-09-20 21:49:28 +000039 </copy>
40 </target>
david_williams39c5f652008-01-02 07:08:39 +000041 <target
42 name="init">
david_williamsaf61cb82008-01-11 12:47:46 +000043 <fail
david_williamsc2f548c2008-07-21 04:06:47 +000044 unless="env.PROJECT_PROJECTS"/>
david_williamsaf61cb82008-01-11 12:47:46 +000045 <fail
david_williamsc2f548c2008-07-21 04:06:47 +000046 unless="projectname"/>
david_williams39c5f652008-01-02 07:08:39 +000047 <property
48 name="labelfile"
david_williamsc2f548c2008-07-21 04:06:47 +000049 value="${env.PROJECT_PROJECTS}/${projectname}/workdir/label.properties"/>
david_williams39c5f652008-01-02 07:08:39 +000050 <available
51 file="${labelfile}"
david_williamsc2f548c2008-07-21 04:06:47 +000052 property="labelfileavailable"/>
david_williams39c5f652008-01-02 07:08:39 +000053 <fail
david_williamsc2f548c2008-07-21 04:06:47 +000054 unless="labelfileavailable"/>
david_williams39c5f652008-01-02 07:08:39 +000055 <property
david_williamsc2f548c2008-07-21 04:06:47 +000056 file="${labelfile}"/>
david_williams39c5f652008-01-02 07:08:39 +000057 <property
58 name="localStampedArtifactsDirectory"
david_williamsc2f548c2008-07-21 04:06:47 +000059 value="${localArtifactsDirectory}/${cctimestamp}"/>
david_williamsece24db2008-03-23 05:45:29 +000060 <fail
61 message="Build probably failed early. Found nothing to copy at ${env.PROJECT_PROJECTS}/${projectname}/workdir/${buildLabel}">
62 <condition>
63 <not>
64 <available
david_williamsc2f548c2008-07-21 04:06:47 +000065 file="${env.PROJECT_PROJECTS}/${projectname}/workdir/${buildLabel}"/>
david_williamsece24db2008-03-23 05:45:29 +000066 </not>
67 </condition>
68 </fail>
david_williamsb96b6732007-09-20 21:49:28 +000069 </target>
david_williams39c5f652008-01-02 07:08:39 +000070</project>