]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Included ANT build file to generate buildinfo.properties
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 20 Mar 2018 12:31:47 +0000 (14:31 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 20 Mar 2018 12:40:52 +0000 (14:40 +0200)
The file contains three properties:
* simantics-platform.branch
* simantics-platform.commit
* simantics-platform.build.id

refs #7828

ci.xml [new file with mode: 0644]

diff --git a/ci.xml b/ci.xml
new file mode 100644 (file)
index 0000000..73c2c0d
--- /dev/null
+++ b/ci.xml
@@ -0,0 +1,18 @@
+<project default="tag-build">
+
+       <tstamp>
+               <format property="timestamp" pattern="yyyy-MM-dd'T'HH:mm:ss.SSSXXX" />
+       </tstamp>
+       <property environment="env" />
+       <property name="infofile" value="buildinfo.properties" />
+       <property name="build.id" value="${env.JOB_NAME} b${env.BUILD_NUMBER}-${timestamp}" />
+
+       <target name="tag-build">
+               <propertyfile file="${infofile}" comment="##Generated file - do not modify!">
+                       <entry key="simantics-platform.branch" value="${env.GERRIT_REFSPEC}" />
+                       <entry key="simantics-platform.commit" value="${env.GIT_COMMIT}" />
+                       <entry key="simantics-platform.build.id" value="${build.id}" />
+               </propertyfile>
+       </target>
+
+</project>