Skip to content

Commit

Permalink
add another makefile env var
Browse files Browse the repository at this point in the history
this allows passing GOBUILD_OPTIONS=-trimpath, which isn't supported by
gox mainline yet. Support for it is in a PR[1] though.

[1]: mitchellh/gox#138
  • Loading branch information
dropwhile committed Sep 8, 2019
1 parent a5f87f6 commit 8aa9ec0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ APP_VER := $(shell git describe --always --tags|sed 's/^v//')
VERSION_VAR := main.ServerVersion

# flags and build configuration
GOBUILD_OPTIONS :=
GOTEST_FLAGS := -cpu=1,2
GOBUILD_DEPFLAGS := -tags netgo
GOBUILD_LDFLAGS ?= -s -w
GOBUILD_FLAGS := ${GOBUILD_DEPFLAGS} -ldflags "${GOBUILD_LDFLAGS} -X ${VERSION_VAR}=${APP_VER}"
GOBUILD_FLAGS := ${GOBUILD_DEPFLAGS} ${GOBUILD_OPTIONS} -ldflags "${GOBUILD_LDFLAGS} -X ${VERSION_VAR}=${APP_VER}"

# cross compile defs
CC_BUILD_ARCHES = darwin/amd64 freebsd/amd64 linux/amd64
Expand Down

0 comments on commit 8aa9ec0

Please sign in to comment.