Skip to content

Commit

Permalink
Use gitarchive-version for spec file
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
  • Loading branch information
jfriesse authored and fabbione committed Sep 5, 2018
1 parent ff93eb5 commit 3f008fd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile.am
Expand Up @@ -63,7 +63,7 @@ $(SPEC): $(SPEC).in .version config.status
alphatag="" && \
dirty="" && \
numcomm="0"; \
else \
elif [ "`git log -1 --pretty=format:x . 2>&1`" = "x" ]; then \
gitver="`GIT_DIR=$(abs_srcdir)/.git git describe --abbrev=4 --match='v*' HEAD 2>/dev/null`" && \
rpmver=`echo $$gitver | sed -e "s/^v//" -e "s/-.*//g"` && \
alphatag=`echo $$gitver | sed -e "s/.*-//" -e "s/^g//"` && \
Expand All @@ -72,6 +72,12 @@ $(SPEC): $(SPEC).in .version config.status
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; \
else \
gitver="`cd $(abs_srcdir); build-aux/git-version-gen .tarball-version .gitarchivever`" && \
rpmver=$$gitver && \
alphatag="" && \
dirty="" && \
numcomm="0"; \
fi && \
if [ -n "$$dirty" ]; then dirty="dirty"; else dirty=""; fi && \
if [ "$$numcomm" = "0" ]; then \
Expand Down

0 comments on commit 3f008fd

Please sign in to comment.