forked from muesli/beehive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (22 loc) · 913 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
BEEHIVE_VERSION=0.3.99
COMMIT_SHA=$(shell git rev-parse --short HEAD)
all: submodule embed
submodule:
[ -d .git ] && git submodule update --init || true
noembed: submodule build
generate:
$(shell go env GOPATH)/bin/go-bindata --tags embed --pkg api -o api/bindata.go --ignore config/.git assets/... config/...
go-bindata:
[ -f $(shell go env GOPATH)/bin/go-bindata ] || go get -u github.com/kevinburke/go-bindata/go-bindata
embed: go-bindata generate build
build:
go build -tags 'embed' -ldflags '-s -w -X main.Version=$(BEEHIVE_VERSION) -X main.CommitSHA=$(COMMIT_SHA)'
debug: submodule go-bindata generate
go build -tags 'embed' -ldflags '-X main.Version=$(BEEHIVE_VERSION) -X main.CommitSHA=$(COMMIT_SHA)'
test:
go test -v $(shell go list ./... | grep -v vendor/)
release:
@./tools/release.sh
clean:
rm -f beehive
.PHONY: clean embed go-bindata noembed generate submodule build release all