-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (25 loc) · 831 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
.PHONY: all deps lint test coverage
OUTPUT = bin/graphblast
GO_SRC = *.go bundle/*.go bind/*.go graphblast/*.go
GO_PKG = github.com/hut8labs/graphblast \
github.com/hut8labs/graphblast/bind \
github.com/hut8labs/graphblast/bundle
all: lint test $(OUTPUT)
$(OUTPUT): $(GO_SRC) assets/*
go build -o $@ graphblast/graphblast.go
objcopy $@ [email protected] \
--add-section assets/script.js=assets/script.js \
--add-section assets/index.html=assets/index.html
mv [email protected] $@
strip $@
test: $(GO_SRC)
go test -timeout=1s $(GO_PKG)
coverage:
./bin/gocov test -v -timeout=1s $(GO_PKG) > .coverage.json
./bin/gocov annotate -ceiling=100 .coverage.json
lint: $(GO_SRC) assets/script.js
jshint assets/script.js
gofmt -d $(GO_SRC) | tee /dev/stderr | wc -l | grep -q ^0$
deps:
npm install jshint
go get -u github.com/axw/gocov