Enhance versionning on build packages (#165)
Some checks failed
Go-Tests / sonar (push) Has been cancelled
Go-Tests / tests (push) Has been cancelled

It was too challenging to only use "tags" without a prefix to trigger builds. So, the new rule is to prefix releases tags by "releases/"

Reviewed-on: #165
This commit is contained in:
2025-08-22 08:33:32 +00:00
parent d30690a45a
commit 46f41ea01d
7 changed files with 54 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
## BUILD
GO_BUILD=go build -ldflags="-X 'repo.katenary.io/katenary/katenary/internal/generator.Version=$(VERSION)'" -trimpath -o $(OUTPUT) ./cmd/katenary
GO_BUILD=go build -ldflags="-X 'katenary.io/internal/generator.Version=$(VERSION)'" -trimpath -o $(OUTPUT) ./cmd/katenary
# Simply build the binary for the current OS and architecture
build: pull katenary

View File

@@ -45,8 +45,10 @@ builder-oci-image:
@$(CTN) build -t go-builder:$(GOVERSION) ./oci/builder \
--build-arg GOVERSION=$(GOVERSION) 1>/dev/null
katenary-oci:
$(CTN) build -f oci/katenary/Containerfile -t katenary:$(VERSION) \
VERSION=$(VERSION) \
VERSION=$${VERSION#releases/}; \
$(CTN) build -f oci/katenary/Containerfile -t katenary:$$VERSION \
--build-arg GOVERSION=$(GOVERSION) \
--build-arg VERSION=$(VERSION) \
./
$(CTN) tag katenary:$(VERSION) katenary:latest
$(CTN) tag katenary:$$VERSION katenary:latest