blob: f26e80a615703bae358bf364a3c11d4546c64e5b [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_williamscbd4c0b2009-12-27 20:34:31 +000022 <!-- = = = end standard properties pattern = = = -->
david_williamsaf61cb82008-01-11 12:47:46 +000023 <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_williams75ea6a92009-05-31 06:26:53 +000036 dir="${env.PROJECT_PROJECTS}/${projectname}/workdir/${buildLabel}"
david_williamscbd4c0b2009-12-27 20:34:31 +000037 excludes="**/*.bak,**/*.temp"/>
david_williamsaf61cb82008-01-11 12:47:46 +000038 <fileset
david_williamsc2f548c2008-07-21 04:06:47 +000039 file="${env.ANT_WORKING}/${projectname}/antBuilderOutput.log"/>
david_williamsb96b6732007-09-20 21:49:28 +000040 </copy>
41 </target>
david_williams39c5f652008-01-02 07:08:39 +000042 <target
43 name="init">
david_williamsaf61cb82008-01-11 12:47:46 +000044 <fail
david_williamsc2f548c2008-07-21 04:06:47 +000045 unless="env.PROJECT_PROJECTS"/>
david_williamsaf61cb82008-01-11 12:47:46 +000046 <fail
david_williamsc2f548c2008-07-21 04:06:47 +000047 unless="projectname"/>
david_williams39c5f652008-01-02 07:08:39 +000048 <property
49 name="labelfile"
david_williamsc2f548c2008-07-21 04:06:47 +000050 value="${env.PROJECT_PROJECTS}/${projectname}/workdir/label.properties"/>
david_williams39c5f652008-01-02 07:08:39 +000051 <available
52 file="${labelfile}"
david_williamsc2f548c2008-07-21 04:06:47 +000053 property="labelfileavailable"/>
david_williams39c5f652008-01-02 07:08:39 +000054 <fail
david_williamsc2f548c2008-07-21 04:06:47 +000055 unless="labelfileavailable"/>
david_williams39c5f652008-01-02 07:08:39 +000056 <property
david_williamsc2f548c2008-07-21 04:06:47 +000057 file="${labelfile}"/>
david_williams39c5f652008-01-02 07:08:39 +000058 <property
59 name="localStampedArtifactsDirectory"
david_williamsc2f548c2008-07-21 04:06:47 +000060 value="${localArtifactsDirectory}/${cctimestamp}"/>
david_williamsece24db2008-03-23 05:45:29 +000061 <fail
62 message="Build probably failed early. Found nothing to copy at ${env.PROJECT_PROJECTS}/${projectname}/workdir/${buildLabel}">
63 <condition>
64 <not>
65 <available
david_williamsc2f548c2008-07-21 04:06:47 +000066 file="${env.PROJECT_PROJECTS}/${projectname}/workdir/${buildLabel}"/>
david_williamsece24db2008-03-23 05:45:29 +000067 </not>
68 </condition>
69 </fail>
david_williamsb96b6732007-09-20 21:49:28 +000070 </target>
david_williams39c5f652008-01-02 07:08:39 +000071</project>