forked from cocaine/cocaine-framework-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (21 loc) · 755 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
.PHONY: all fmt vet lint test travis
all: deps fmt test
GIT_VERSION := $(shell git describe --abbrev=8 --dirty --always)
GO_LDFLAGS=-ldflags "-X `go list ./version`.Version $(GIT_VERSION)"
bridge: deps
go build -o bridge $(GO_LDFLAGS) ./cmd/bridge_main.go
deps:
go get -t ./cocaine12/...
fmt:
@echo "+ $@"
@test -z "$$(gofmt -s -l ./cocaine12/ | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" || \
echo "+ please format Go code with 'gofmt -s'"
lint:
@echo "+ $@"
@test -z "$$(golint ./cocaine12/... | grep -v Godeps/_workspace/src/ | grep -v cocaine12/old | tee /dev/stderr)"
vet:
@echo "+ $@"
@go vet ./cocaine12/...
test:
@echo "+ $@"
@go test -v -test.short -cover -race github.com/cocaine/cocaine-framework-go/cocaine12