Skip to content

Commit

Permalink
[build] fix git dirty detection
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio M. Di Nitto <[email protected]>
  • Loading branch information
fabbione committed Nov 1, 2017
1 parent 7ffc699 commit 9bda758
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ $(SPEC): $(SPEC).in .version config.status
alphatag=`echo $$gitver | sed -e "s/.*-//" -e "s/^g//"` && \
vtag=`echo $$gitver | sed -e "s/-.*//g"` && \
numcomm=`GIT_DIR=$(abs_srcdir)/.git git rev-list $$vtag..HEAD | wc -l` && \
GIT_DIR=$(abs_srcdir)/.git git update-index --refresh > /dev/null 2>&1 || true && \
dirty=`GIT_DIR=$(abs_srcdir)/.git git diff-index --name-only HEAD 2>/dev/null`; \
cd $(abs_srcdir) && \
git update-index --refresh > /dev/null 2>&1 || true && \
dirty=`git diff-index --name-only HEAD 2>/dev/null` && cd - 2>/dev/null; \
fi && \
if [ -n "$$dirty" ]; then dirty="dirty"; else dirty=""; fi && \
if [ "$$numcomm" = "0" ]; then \
Expand Down

0 comments on commit 9bda758

Please sign in to comment.