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.
This commit is contained in:
parent
d011845131
commit
ce9a7fd6ff
1 changed files with 2 additions and 1 deletions
|
@ -13,8 +13,9 @@
|
|||
<attribute name="outputproperty"/>
|
||||
<sequential>
|
||||
<local name="git.present"/>
|
||||
<local name="git.revision"/>
|
||||
<available file="@{repository}/.git" property="git.present"/>
|
||||
<exec executable="git" outputproperty="git.revision" failifexecutionfails="false">
|
||||
<exec executable="git" dir="@{repository}" outputproperty="git.revision" failifexecutionfails="false">
|
||||
<arg line="describe --dirty --tags --always"/>
|
||||
</exec>
|
||||
<condition property="@{outputproperty}" value="${git.revision}" else="unknown">
|
||||
|
|
Reference in a new issue