From 0c67debbc51c7a88993c6cfc6dd12f0374500287 Mon Sep 17 00:00:00 2001 From: Hasan Turken Date: Mon, 16 Sep 2024 09:35:24 +0300 Subject: [PATCH] Fix crossplane internal version in ci Signed-off-by: Hasan Turken (cherry picked from commit 1a394f3d2c77409c766b89db42bcb1c7a035ec10) --- Earthfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Earthfile b/Earthfile index af9457201..fd086b1df 100644 --- a/Earthfile +++ b/Earthfile @@ -147,11 +147,12 @@ go-build: ARG EARTHLY_GIT_SHORT_HASH ARG EARTHLY_GIT_COMMIT_TIMESTAMP ARG CROSSPLANE_VERSION=v0.0.0-${EARTHLY_GIT_COMMIT_TIMESTAMP}-${EARTHLY_GIT_SHORT_HASH} + ARG CROSSPLANE_INTERNAL_VERSION=${CROSSPLANE_VERSION} ARG TARGETARCH ARG TARGETOS ARG GOARCH=${TARGETARCH} ARG GOOS=${TARGETOS} - ARG GOFLAGS="-ldflags=-X=github.com/crossplane/crossplane/internal/version.version=${CROSSPLANE_VERSION}" + ARG GOFLAGS="-ldflags=-X=github.com/crossplane/crossplane/internal/version.version=${CROSSPLANE_INTERNAL_VERSION}" ARG CGO_ENABLED=0 FROM +go-modules LET ext = "" @@ -345,7 +346,8 @@ helm-setup: # ci-version is used by CI to set the CROSSPLANE_VERSION environment variable. ci-version: LOCALLY - RUN echo "CROSSPLANE_VERSION=$(git describe --dirty --always --tags|sed -e 's/-/./2g'|sed 's/[\.,-]up.*//')" > $GITHUB_ENV + RUN echo "CROSSPLANE_VERSION=$(git describe --dirty --always --tags|sed -e 's/-/./2g')" > $GITHUB_ENV + RUN echo "CROSSPLANE_INTERNAL_VERSION=$(git describe --dirty --always --tags|sed -e 's/-/./2g'|sed -e 's/[\.,-]up.*//')" >> $GITHUB_ENV # ci-artifacts is used by CI to build and push the Crossplane image, chart, and # binaries.