Use git plumbing commands to get the I3_VERSION

Fixes #3656
This commit is contained in:
Orestis Floros 2019-03-22 15:06:23 +02:00
parent 24a8eac134
commit fefeedf8da
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ AX_EXTEND_SRCDIR
AS_IF([test -d ${srcdir}/.git], AS_IF([test -d ${srcdir}/.git],
[ [
VERSION="$(git -C ${srcdir} describe --tags --abbrev=0)" VERSION="$(git -C ${srcdir} describe --tags --abbrev=0)"
I3_VERSION="$(git -C ${srcdir} describe --tags --always) ($(git -C ${srcdir} log --pretty=format:%cd --date=short -n1), branch \\\"$(git -C ${srcdir} describe --tags --always --all | sed s:heads/::)\\\")" I3_VERSION="$(git -C ${srcdir} describe --tags --always) ($(git -C ${srcdir} rev-list --format=%cd --date=short -n1 $(git rev-parse HEAD) | tail -n1), branch \\\"$(git -C ${srcdir} describe --tags --always --all | sed s:heads/::)\\\")"
# Mirrors what libi3/is_debug_build.c does: # Mirrors what libi3/is_debug_build.c does:
is_release=$(test $(echo "${I3_VERSION}" | cut -d '(' -f 1 | wc -m) -lt 10 && echo yes || echo no) is_release=$(test $(echo "${I3_VERSION}" | cut -d '(' -f 1 | wc -m) -lt 10 && echo yes || echo no)
], ],