use tag as GITREF if available
This commit is contained in:
parent
56c66b5472
commit
01d686078e
|
@ -54,9 +54,8 @@ CFLAGS += -m64 -mcmodel=medlow
|
|||
|
||||
ISGITREPO != git rev-parse --is-inside-work-tree 2> /dev/null || echo "false"
|
||||
.if $(ISGITREPO) == "true"
|
||||
GITREF != git rev-parse --short HEAD
|
||||
GITBRANCH != git rev-parse --abbrev-ref HEAD
|
||||
CPPFLAGS += -DMINIUPNPD_GIT_REF=\"$(GITBRANCH)-$(GITREF)\"
|
||||
GITREF != git describe --exact-match --tags 2> /dev/null || echo "`git rev-parse --abbrev-ref HEAD`-`git rev-parse --short HEAD`"
|
||||
CPPFLAGS += -DMINIUPNPD_GIT_REF=\"$(GITREF)\"
|
||||
.endif
|
||||
|
||||
STDOBJS = miniupnpd.o upnphttp.o upnpdescgen.o upnpsoap.o \
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
ISGITREPO := $(shell git rev-parse --is-inside-work-tree)
|
||||
ifeq ($(ISGITREPO),true)
|
||||
GITREF := $(shell git rev-parse --short HEAD)
|
||||
GITBRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
||||
CPPFLAGS += -DMINIUPNPD_GIT_REF=\"$(GITBRANCH)-$(GITREF)\"
|
||||
GITREF := $(shell git describe --exact-match --tags 2> /dev/null || echo "`git rev-parse --abbrev-ref HEAD`-`git rev-parse --short HEAD`" )
|
||||
CPPFLAGS += -DMINIUPNPD_GIT_REF=\"$(GITREF)\"
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue