mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Makefile: Use git describe --dirty for GIT VERSION
dirty indicates if the repo has uncommited changes or not when building, so dont hardcode this info. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
b947db040c
commit
e277e838d7
@ -60,7 +60,7 @@ dist-hook:
|
||||
$(MAKE) $(AM_MAKEFLAGS) all
|
||||
|
||||
if USE_GIT_VERSION
|
||||
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty
|
||||
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
|
||||
REAL_PACKAGE_VERSION = $(GIT_VERSION)
|
||||
else
|
||||
REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
|
||||
|
@ -25,7 +25,7 @@ EXTRA_DIST = \
|
||||
MOSTLYCLEANFILES = $(bin_SCRIPTS) *.tmp
|
||||
|
||||
if USE_GIT_VERSION
|
||||
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty
|
||||
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
|
||||
REAL_PACKAGE_VERSION = $(GIT_VERSION)
|
||||
else
|
||||
REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
|
||||
|
@ -18,7 +18,7 @@ INCLUDES = -I$(top_srcdir)/lib/libalpm
|
||||
AM_CFLAGS = -pedantic -D_GNU_SOURCE
|
||||
|
||||
if USE_GIT_VERSION
|
||||
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty
|
||||
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
|
||||
DEFS += -DGIT_VERSION=\"$(GIT_VERSION)\"
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user