Skip to content

Commit

Permalink
relocate ldflags to properly interpolate GOARCH
Browse files Browse the repository at this point in the history
  • Loading branch information
James Ranson committed Apr 23, 2020
1 parent 6277e81 commit a6aeb87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ PROGVER := $(shell grep 'applicationVersion = ' $(MOCKSTER_MAIN)/main.go
BUILD_TIME := $(shell date -u +%FT%T%z)
GIT_LATEST_COMMIT_ID := $(shell git rev-parse HEAD)
GO_VER := $(shell go version | awk '{print $$3}')
LDFLAGS=-ldflags "-s -X main.applicationBuildTime=$(BUILD_TIME) -X main.applicationGitCommitID=$(GIT_LATEST_COMMIT_ID) -X main.applicationGoVersion=$(GO_VER) -X main.applicationGoArch=$(GOARCH)"
GOARCH ?= amd64
TAGVER ?= unspecified
LDFLAGS =-ldflags "-s -X main.applicationBuildTime=$(BUILD_TIME) -X main.applicationGitCommitID=$(GIT_LATEST_COMMIT_ID) -X main.applicationGoVersion=$(GO_VER) -X main.applicationGoArch=$(GOARCH)"

.PHONY: validate-app-version
validate-app-version:
Expand Down

0 comments on commit a6aeb87

Please sign in to comment.