chore: fix dev version string in Docker builds (#32683)
This commit is contained in:
parent
7b8e6e1f74
commit
6bf587097f
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
|
@ -5,7 +5,7 @@ SHA ?= $(shell test -d .git && git rev-parse --short HEAD)
|
|||
GIT_TAG := $(shell test -d .git && git describe --abbrev=0 --tags)
|
||||
# commits since the latest tag, empty or 0 means the commit is tagged
|
||||
GIT_DIST := $(shell test -n "$(GIT_TAG)" && git rev-list --count $(GIT_TAG)..HEAD)
|
||||
NEXT_TAG = $(shell echo $(GIT_TAG) | awk -F. -v b='$(BUMP)' '{if (b == "patch") $$NF++; else {$$2++; $$3=0}} 1' OFS=.)
|
||||
NEXT_TAG = $(shell echo $(GIT_TAG) | awk -F. -v b='$(BUMP)' '{ if (b == "patch") { m = $$2; p = $$3 + 1 } else { m = $$2 + 1; p = 0 }; print $$1 "." m "." p }')
|
||||
# untagged builds are semver pre-releases of the upcoming version
|
||||
TAG_NAME ?= $(if $(filter-out 0,$(GIT_DIST)),$(NEXT_TAG)-dev+$(SHA),$(GIT_TAG))
|
||||
COMMIT := $(SHA)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue