Skip to content

Commit

Permalink
Correct version extraction when tags are missing
Browse files Browse the repository at this point in the history
Issue: #55
  • Loading branch information
dspinellis committed Mar 25, 2019
1 parent e5bc6f1 commit 75cc871
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
<macrodef name="gitversion" description="Get git version.">
<attribute name="outputproperty"/>
<sequential>
<echo message="git describe --abbrev=6 => '@{outputproperty}'"/>
<echo message="git rev-parse --short=6 => '@{outputproperty}'"/>
<exec executable="git"
failonerror="true"
outputproperty="@{outputproperty}">
<arg value="describe"/>
<arg value="--abbrev=6"/>
<arg value="rev-parse"/>
<arg value="--short=6"/>
<arg value="HEAD"/>
<redirector>
<outputfilterchain>
Expand Down Expand Up @@ -78,8 +78,8 @@
<target name="version">
<exec executable="git"
outputproperty="VERSION">
<arg value="describe"/>
<arg value="--abbrev=6"/>
<arg value="rev-parse"/>
<arg value="--short=6"/>
<arg value="HEAD"/>
</exec>
<echo>Version is ${VERSION}</echo>
Expand Down

0 comments on commit 75cc871

Please sign in to comment.