Skip to content

Commit ce9a7fd

Browse files
committed
Fixes for git-commit-id macro
All variables used by git-commit-id (except the output) are now local. The git command now runs in the repository directory instead of current.
1 parent d011845 commit ce9a7fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build-common.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
<attribute name="outputproperty"/>
1414
<sequential>
1515
<local name="git.present"/>
16+
<local name="git.revision"/>
1617
<available file="@{repository}/.git" property="git.present"/>
17-
<exec executable="git" outputproperty="git.revision" failifexecutionfails="false">
18+
<exec executable="git" dir="@{repository}" outputproperty="git.revision" failifexecutionfails="false">
1819
<arg line="describe --dirty --tags --always"/>
1920
</exec>
2021
<condition property="@{outputproperty}" value="${git.revision}" else="unknown">

0 commit comments

Comments
 (0)