JAL-1522 report commit id and branch in installation type (may move this to separate...
authorJim Procter <jprocter@issues.jalview.org>
Mon, 7 Sep 2015 12:08:27 +0000 (13:08 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 7 Sep 2015 12:08:27 +0000 (13:08 +0100)
build.xml

index d0aad96..e9006ca 100755 (executable)
--- a/build.xml
+++ b/build.xml
     <tstamp prefix="build">
       <format property="date" pattern="dd MMMM yyyy" />
     </tstamp>
+    <exec executable="/usr/bin/git" outputproperty="git.commit"  failifexecutionfails="false">
+      <arg value="rev-parse"/>
+      <arg value="--short"/>
+      <arg value="HEAD"/>
+    </exec>
+    <exec executable="/usr/bin/git" outputproperty="git.branch" failifexecutionfails="false">
+      <arg value="rev-parse"/>
+      <arg value="--abbrev-ref"/>
+      <arg value="HEAD"/>
+    </exec>
     <properties file="${outputDir}/.build_properties">
       <header>
           ---Jalview Build Details---
         </header>      
       <property name="VERSION" value="${JALVIEW_VERSION}" />
-      <property name="INSTALLATION" value="${INSTALLATION}" />
+      <property name="INSTALLATION" value="${INSTALLATION} git-commit:${git.commit} [${git.branch}]" />
       <property name="BUILD_DATE" value="${build.date}" />
     </properties>
   </target>