forked from uber/arachne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (35 loc) · 1.14 KB
/
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
45
46
47
48
49
50
PACKAGES=$(shell glide novendor)
builddir := build
$(info builddir ${builddir})
${builddir}:
mkdir -p $(builddir)
.PHONY: bins
bins: install_ci
go build -o ${builddir}/arachned github.com/uber/arachne/arachned/
all: bins
clean:
rm -f ${builddir}/*
.PHONY: lint
lint:
go vet $(PACKAGES)
.PHONY: test
test: check-license lint install_ci
find . -type f -name '*.go' | xargs golint
go test $(PACKAGES)
.PHONY: vendor
vendor: glide.lock
glide install
.PHONY: install_ci
install_ci:
glide --version || go get -u -f github.com/Masterminds/glide
make vendor
go get -u -f github.com/golang/lint/golint
vendor/github.com/uber/uber-licence: vendor
[ -d vendor/github.com/uber/uber-licence ] || glide install
vendor/github.com/uber/uber-licence/node_modules: vendor/github.com/uber/uber-licence
cd vendor/github.com/uber/uber-licence && npm install
.PHONY: check-license add-license
check-license: vendor/github.com/uber/uber-licence/node_modules
./vendor/github.com/uber/uber-licence/bin/licence --dry --file '*.go'
add-license: vendor/github.com/uber/uber-licence/node_modules
./vendor/github.com/uber/uber-licence/bin/licence --verbose --file '*.go'