pud: wireformat: java: also add a Git-Descriptor manifest header
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 7 May 2013 12:13:15 +0000 (14:13 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 7 May 2013 12:18:17 +0000 (14:18 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/wireformat-java/resources/build.xml

index 9ed3c76..e2d1db3 100644 (file)
        -->
 
        <target name="getgitcommit" description="Retrieve the Git Commit SHA1">
+               <exec dir="${basedir}" executable="git" outputproperty="git.commit.descriptor" failonerror="false" error="/dev/null">
+                       <arg value="describe" />
+                       <arg value="--dirty" />
+                       <arg value="--always" />
+               </exec>
                <exec dir="${basedir}" executable="git" outputproperty="git.commit.sha" failonerror="false" error="/dev/null">
                        <arg value="rev-parse" />
                        <arg value="HEAD" />
@@ -59,6 +64,7 @@
                        <manifest>
                                <attribute name="Class-Path" value="." />
                                <attribute name="Version" value="${version}" />
+                               <attribute name="Git-Descriptor" value="${git.commit.descriptor}" />
                                <attribute name="Git-SHA" value="${git.commit.sha}" />
                        </manifest>
                </jar>