From c234a0e424411af4036cc77ffab0a6c67469a1bd Mon Sep 17 00:00:00 2001 From: Luigi Date: Sun, 8 Oct 2023 00:08:47 +0200 Subject: [PATCH] fix: use correct version parameter as arg --- Dockerfile | 2 +- main.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index cfeab63..c649ae1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ ENV CGO_ENABLED=0 ENV UNCONDITIONAL_API_BUILD_COMMIT_VERSION=${UNCONDITIONAL_API_BUILD_COMMIT_VERSION} ENV UNCONDITIONAL_API_BUILD_RELEASE_VERSION=${UNCONDITIONAL_API_BUILD_RELEASE_VERSION} -RUN go build --ldflags "-X 'main.version=${UNCONDITIONAL_API_BUILD_RELEASE_VERSION}' -X 'main.gitCommit=${UNCONDITIONAL_API_BUILD_COMMIT_VERSION}'" --tags=release -o main . +RUN go build --ldflags "-X 'main.releaseVersion=${UNCONDITIONAL_API_BUILD_RELEASE_VERSION}' -X 'main.gitCommit=${UNCONDITIONAL_API_BUILD_COMMIT_VERSION}'" --tags=release -o main . FROM builder as data WORKDIR /data diff --git a/main.go b/main.go index 62ca38c..b1b6a2d 100644 --- a/main.go +++ b/main.go @@ -7,14 +7,14 @@ import ( ) var ( - releaseVersion string - gitCommit string + releaseVersion string + gitCommit string ) func main() { v := map[string]string{ - "releaseVersion": "unknown", - "gitCommit": "unknown", + "releaseVersion": "unknown", + "gitCommit": "unknown", } if releaseVersion != "" {