diff options
| author | Steven Normore <snormore@gmail.com> | 2014-04-09 11:49:19 +0000 |
|---|---|---|
| committer | Steven Normore <snormore@gmail.com> | 2014-04-09 11:51:43 +0000 |
| commit | 38b69be6804306a919363d4d12bcfebb62ec97ca (patch) | |
| tree | 832fe45176666e849f0abef1a5f335b41ec298e0 /Makefile | |
| parent | add bin to gitignore (diff) | |
| download | dedo-38b69be6804306a919363d4d12bcfebb62ec97ca.tar.gz dedo-38b69be6804306a919363d4d12bcfebb62ec97ca.tar.xz | |
add ldflags on build with main.commit and main.branch to Makefile
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,6 +1,9 @@ TEST=. BENCH=. COVERPROFILE=/tmp/c.out +BRANCH=`git rev-parse --abbrev-ref HEAD` +COMMIT=`git rev-parse --short HEAD` +GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)" bench: benchpreq go test -v -test.bench=$(BENCH) @@ -31,7 +34,7 @@ get: build: get @mkdir -p bin - @go build -a -o bin/bolt-`git rev-parse --short HEAD` ./cmd/bolt + @go build -ldflags=$(GOLDFLAGS) -a -o bin/bolt-`git rev-parse --short HEAD` ./cmd/bolt test: fmt errcheck @go get github.com/stretchr/testify/assert |
