mirror of https://github.com/ipxe/ipxe.git
Merge 5f810751d7
into f68c8b09e3
commit
da8e435eeb
|
@ -210,8 +210,9 @@ install :
|
|||
#
|
||||
# Version number calculations
|
||||
#
|
||||
ifneq ($(wildcard ../.git),)
|
||||
VERSIONS := $(shell git describe --tags --always --long --abbrev=1 --match "v*")
|
||||
VERSIONS := $(if $(wildcard ../.git),$(shell git describe --tags --always --long --abbrev=32 --match "v*"))
|
||||
|
||||
ifneq ($(filter v%, $(VERSIONS)),)
|
||||
VERSION_TUPLE := $(subst ., ,$(subst -, ,$(patsubst v%,%,$(VERSIONS))))
|
||||
VERSION_MAJOR := $(word 1,$(VERSION_TUPLE))
|
||||
VERSION_MINOR := $(word 2,$(VERSION_TUPLE))
|
||||
|
@ -227,11 +228,12 @@ VERSION_MAJOR = 1
|
|||
VERSION_MINOR = 0
|
||||
VERSION_PATCH = 0
|
||||
EXTRAVERSION = +
|
||||
GITVERSION = $(VERSIONS)
|
||||
endif
|
||||
MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
|
||||
VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
|
||||
ifneq ($(GITVERSION),)
|
||||
VERSION += ($(GITVERSION))
|
||||
VERSION += ($(shell echo $(GITVERSION) | cut -c1-8))
|
||||
endif
|
||||
version :
|
||||
@$(ECHO) "$(VERSION)"
|
||||
|
|
Loading…
Reference in New Issue