pull/534/merge
Masahiro Yamada 2025-03-20 13:04:19 +03:00 committed by GitHub
commit da8e435eeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -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)"