Skip to content

Commit

Permalink
fix: use correct version parameter as arg
Browse files Browse the repository at this point in the history
  • Loading branch information
luigibarbato committed Oct 7, 2023
1 parent b67f374 commit 1cfd827
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down

0 comments on commit 1cfd827

Please sign in to comment.