Merge commit '5aaf6c7537b6e813aaeea51a9fe6aea4dc781094' into v1.25
This commit is contained in:
commit
435c2b8213
@ -2,11 +2,15 @@
|
|||||||
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||||
GIT_TAG := $(shell git describe --tags --match v*.*.* 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)
|
GIT_TAG := $(shell git describe --tags --match v*.*.* 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)
|
||||||
|
|
||||||
# append branch name to tag if NOT main nor master
|
|
||||||
TAG := $(GIT_TAG)
|
TAG := $(GIT_TAG)
|
||||||
|
# append branch name to tag if NOT main nor master
|
||||||
ifeq (,$(filter main master, $(GIT_BRANCH)))
|
ifeq (,$(filter main master, $(GIT_BRANCH)))
|
||||||
ifneq ($(GIT_TAG), $(GIT_BRANCH))
|
# If branch is substring of tag, omit branch name
|
||||||
TAG = $(GIT_TAG)-$(GIT_BRANCH)
|
ifeq ($(findstring $(GIT_BRANCH), $(GIT_TAG)),)
|
||||||
|
# only append branch name if not equal tag
|
||||||
|
ifneq ($(GIT_TAG), $(GIT_BRANCH))
|
||||||
|
TAG = $(GIT_TAG)-$(GIT_BRANCH)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user