summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Ruzicka2010-12-02 18:29:57 (EST)
committerMichal Ruzicka2010-12-02 18:29:57 (EST)
commitcceb68ea25f78ea5186049678d272899ea96a590 (patch)
tree3bc61869021c493d739a49010f0e16fbba33c3dd
parentb3ffcde4a923f2f80a6be7ec30ad7a62f4bb2d7b (diff)
downloadcdo-cceb68ea25f78ea5186049678d272899ea96a590.zip
cdo-cceb68ea25f78ea5186049678d272899ea96a590.tar.gz
cdo-cceb68ea25f78ea5186049678d272899ea96a590.tar.bz2
store type in an XML file, and while at it store build timestamp in that file too
-rw-r--r--releng/org.eclipse.emf.cdo.releng/build.xml25
1 files changed, 19 insertions, 6 deletions
diff --git a/releng/org.eclipse.emf.cdo.releng/build.xml b/releng/org.eclipse.emf.cdo.releng/build.xml
index bfd0cb8..754cd7e 100644
--- a/releng/org.eclipse.emf.cdo.releng/build.xml
+++ b/releng/org.eclipse.emf.cdo.releng/build.xml
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<project name="CDO">
-
<condition property="properties.file" value="build.properties" else="local.properties">
<isset property="server.build" />
</condition>
@@ -219,14 +218,28 @@
</condition>
</target>
- <target name="store.build.type" depends="infer.build.type.from.Hudson.build.cause">
- <echo message="${build.type}" file="${build.type.file.name}" />
+ <target name="set.build.timestamp.from.environment" unless="build.timestamp">
+ <condition property="build.timestamp" value="${env.BUILD_ID}">
+ <isset property="env.BUILD_ID" />
+ </condition>
+ </target>
+
+ <target name="set.build.timestamp" depends="set.build.timestamp.from.environment" unless="build.timestamp">
+ <tstamp>
+ <format property="build.timestamp" pattern="yyyy-MM-dd_HH-mm-ss" locale="en,US" />
+ </tstamp>
+ </target>
+
+ <target name="store.build.info" depends="infer.build.type.from.Hudson.build.cause,set.build.timestamp">
+ <echoxml file="${build.type.file.name}">
+ <build type="${build.type}" timestamp="${build.timestamp}" />
+ </echoxml>
</target>
<target name="init.build.properties">
- <property name="build.type.file.name" location="${build.root}/build.type" />
- <antcall target="store.build.type" />
- <loadfile property="build.type" srcfile="${build.type.file.name}" />
+ <property name="build.type.file.name" location="${build.root}/build-info.xml" />
+ <antcall target="store.build.info" />
+ <xmlproperty file="${build.type.file.name}" collapseattributes="true" />
<echo message="Build type is: ${build.type}" />
<condition property="build.nightly" value="true">