blob: a97b8d952e94aeae8e0b38f2115454cc192ca0a2 [file] [log] [blame]
david_williamsd957bc32006-11-20 00:07:15 +00001<project
david_williams42f9b242006-11-27 18:45:14 +00002 name="label"
david_williamsd957bc32006-11-20 00:07:15 +00003 default="label"
4 basedir=".">
ndaib8cedc82005-09-13 18:00:32 +00005
david_williams42f9b242006-11-27 18:45:14 +00006 <!-- = = = standard properties pattern = = = -->
7 <!--
8 Note to be cross-platform, "environment variables" are only appropriate for
david_williamsd957bc32006-11-20 00:07:15 +00009 some variables, e.g. ones we set, since properties are case sensitive, even if
10 the environment variables on your operating system are not, e.g. it will
11 be ${env.Path} not ${env.PATH} on Windows -->
12 <property environment="env" />
david_williams42f9b242006-11-27 18:45:14 +000013
14 <!--
15 Let users override standard properties, if desired.
16 If directory, file, or some properties do not exist,
17 then standard properties will be used.
18 -->
19 <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
20
21 <!-- load standard properties for production environment -->
22 <property file="${env.STANDARD_PROPERTIES_DIR}/${ant.project.name}.properties" />
23 <!-- = = = end standard properties pattern = = = -->
24
david_williams2a01c5a2005-11-07 14:27:16 +000025
26 <!-- Capture the computer name in a cross-platform manner -->
david_williamsd957bc32006-11-20 00:07:15 +000027 <property
28 name="env.COMPUTERNAME"
29 value="${env.HOSTNAME}" />
david_williams2a01c5a2005-11-07 14:27:16 +000030
31
david_williamsd957bc32006-11-20 00:07:15 +000032 <target name="label">
33 <available
34 file="${buildDirectory}/label.properties"
35 property="label.properties.exists" />
36 <antcall target="create.label.properties" />
ndaib8cedc82005-09-13 18:00:32 +000037 </target>
38
david_williamsd957bc32006-11-20 00:07:15 +000039 <target
40 name="create.label.properties"
41 unless="label.properties.exists">
42 <mkdir dir="${buildDirectory}" />
43 <tstamp>
44 <format
45 property="date"
46 pattern="yyyyMMdd"
47 timezone="UTC" />
48 </tstamp>
49 <tstamp>
50 <format
51 property="time"
52 pattern="HHmm"
53 timezone="UTC" />
54 </tstamp>
55 <property
56 name="timestamp"
57 value="${date}${time}" />
58 <property
59 name="buildType"
60 value="I" />
61 <property
62 name="buildId"
63 value="${buildType}${timestamp}" />
ndaib8cedc82005-09-13 18:00:32 +000064
david_williamsd957bc32006-11-20 00:07:15 +000065 <!--this naming convention used by php scripts on download server-->
66 <property
67 name="buildLabel"
68 value="${buildType}-${buildId}-${timestamp}" />
ndaib8cedc82005-09-13 18:00:32 +000069
david_williamsd957bc32006-11-20 00:07:15 +000070 <!--store the build label information in a file-->
71 <echo
72 file="${buildDirectory}/label.properties"
73 append="true">
74 buildType=${buildType}
75 </echo>
76 <echo
77 file="${buildDirectory}/label.properties"
78 append="true">
79 buildId=${buildId}
80 </echo>
81 <echo
82 file="${buildDirectory}/label.properties"
83 append="true">
84 timestamp=${timestamp}
85 </echo>
86 <echo
87 file="${buildDirectory}/label.properties"
88 append="true">
89 buildLabel=${buildLabel}
90 </echo>
91 <echo
92 file="${buildDirectory}/label.properties"
93 append="true">
94 date=${date}
95 </echo>
96 <echo
97 file="${buildDirectory}/label.properties"
98 append="true">
99 time=${time}
100 </echo>
david_williams2a01c5a2005-11-07 14:27:16 +0000101
102
david_williamsd957bc32006-11-20 00:07:15 +0000103 <echo
104 file="${buildDirectory}/buildmachineinfo.properties"
105 append="true">
106 buildComputer="${env.COMPUTERNAME}" buildOS="${env.OS}"
107 </echo>
david_williams2a01c5a2005-11-07 14:27:16 +0000108
109 </target>
ndaib8cedc82005-09-13 18:00:32 +0000110
111</project>