Created
November 27, 2014 23:47
-
-
Save ae6rt/32537e2f3a9d4102bfae to your computer and use it in GitHub Desktop.
Setting subpackage vars with ldflags during a Go build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION := 1.0 | |
DATE := $(shell date) | |
COMMIT_ID := $(shell git rev-parse --short HEAD) | |
SDK_INFO := $(shell go version) | |
BUILD_DIR=build | |
LD_FLAGS := -X github.com/xoom/gorest/rest.version $(VERSION) -X github.com/xoom/gorest/rest.commit $(COMMIT_ID) -X github.com/xoom/gorest/rest.buildTime '$(DATE)' -X github.com/xoom/gorest/rest.sdkInfo '$(SDK_INFO)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The "main" package resides in .../xoom/gorest. The rest package is a subpackage of this project.