Skip to content

Commit 46df358

Browse files
ChristophBodensteinChristophBodenstein
authored andcommitted
added shorthash to version information properties
1 parent 57a170d commit 46df358

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

TimeNETOptimizationEnvironment/build.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@
126126
<arg value="describe"/>
127127
<arg value="--tags"/>
128128
</exec>
129+
130+
<echo message="getting shorthash..."/>
131+
<exec executable="git" outputproperty="shorthash"
132+
failifexecutionfails="false">
133+
<arg value="log"/>
134+
<arg value="--pretty=format:%h"/>
135+
<arg value="-n 1"/>
136+
</exec>
137+
129138
<antcall target="-store-version-string"/>
130139
<!-- ensure version is defined even if git was not available -->
131140
<property file="${res.dir}/Version.properties"/>
@@ -146,6 +155,7 @@
146155
<entry key="version" value="${version}"/>
147156
<entry key="timestamp" value="${timestamp}"/>
148157
<entry key="build.date" value="${build.date}"/>
158+
<entry key="shorthash" value="${shorthash}"/>
149159
</propertyfile>
150160

151161
<property name="absolute.path" location="${res.dir}/Version.properties"/>

0 commit comments

Comments
 (0)