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

@@ -13,7 +13,8 @@ COPY internal /go/src/repo.katenary.io/katenary/katenary/internal
WORKDIR /go/src/repo.katenary.io/katenary/katenary
ENV CGO_ENABLED=0
RUN set -xe; \
go build -ldflags="-X 'repo.katenary.io/katenary/katenary/internal/generator.Version=v${VERSION}'" -trimpath -o katenary ./cmd/katenary
export VERSION=${VERSION#releases/}; \
go build -ldflags="-X 'katenary.io/internal/generator.Version=v${VERSION}'" -trimpath -o katenary ./cmd/katenary
FROM scratch