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 != "" {