fix(build): filter git describe to match only v* tags
The api/apps/v1alpha1/* subtags share the same commit as the release tags. git describe --exact-match picks the first match alphabetically, returning api/apps/v1alpha1/vX.Y.Z instead of vX.Y.Z, which produces invalid Docker image tags. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
parent
655eb39ac2
commit
fbbccdbb7b
1 changed files with 3 additions and 3 deletions
|
|
@ -6,13 +6,13 @@ else
|
|||
endif
|
||||
|
||||
REGISTRY ?= ghcr.io/cozystack/cozystack
|
||||
TAG = $(shell git describe --tags --exact-match 2>/dev/null || echo latest)
|
||||
TAG = $(shell git describe --tags --exact-match --match 'v*' 2>/dev/null || echo latest)
|
||||
PUSH := 1
|
||||
LOAD := 0
|
||||
BUILDER ?=
|
||||
PLATFORM ?=
|
||||
BUILDX_EXTRA_ARGS ?=
|
||||
COZYSTACK_VERSION = $(patsubst v%,%,$(shell git describe --tags))
|
||||
COZYSTACK_VERSION = $(patsubst v%,%,$(shell git describe --tags --match 'v*'))
|
||||
|
||||
BUILDX_ARGS := --provenance=false --push=$(PUSH) --load=$(LOAD) \
|
||||
--label org.opencontainers.image.source=https://github.com/cozystack/cozystack \
|
||||
|
|
@ -28,6 +28,6 @@ endef
|
|||
ifeq ($(COZYSTACK_VERSION),)
|
||||
$(shell git remote add upstream https://github.com/cozystack/cozystack.git || true)
|
||||
$(shell git fetch upstream --tags)
|
||||
COZYSTACK_VERSION = $(patsubst v%,%,$(shell git describe --tags))
|
||||
COZYSTACK_VERSION = $(patsubst v%,%,$(shell git describe --tags --match 'v*'))
|
||||
endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue