-
Notifications
You must be signed in to change notification settings - Fork 75
/
Makefile
44 lines (34 loc) · 1016 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
35
36
37
38
39
40
41
42
43
44
COMMIT = $$(git describe --always)
DEBUG_FLAG = $(if $(DEBUG),-debug)
updatedeps:
@echo "====> Install & Update depedencies..."
go get -v -u github.com/jteeuwen/go-bindata/...
go get -v -d -u -t ./...
deps:
@echo "====> Install depedencies..."
go get -v github.com/jteeuwen/go-bindata/...
go get -v -d -t ./...
devdeps:
@echo "====> Install depedencies for development..."
go get -v github.com/golang/lint/golint
generate:
@go generate ./...
build: generate
@echo "====> Build gcli in ./bin "
go build -ldflags "-X main.GitCommit=\"$(COMMIT)\"" -o bin/gcli
install: generate
@echo "====> Install gcli in $(GOPATH)/bin ..."
@go install -ldflags "-X main.GitCommit=\"$(COMMIT)\""
test: build devdeps
@echo "====> Run test"
@sh -c "$(CURDIR)/test.sh"
test-race: generate devdeps
go test -race ./...
# Run functional test
test-functional: build devdeps
@echo "====> Run functional test"
cd tests; go test -v ./...
godoc: build
@echo "====> Generate doc.go"
@rm doc.go
@./bin/gcli -godoc