forked from osminogin/tornote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (29 loc) · 869 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
GITCOMMIT = $(shell git rev-parse --short HEAD)
GOLDFLAGS = "-X main.GitCommit=$(GITCOMMIT)"
GOTOOLS = github.com/mattn/goveralls golang.org/x/tools/cmd/cover github.com/jteeuwen/go-bindata/...
default: tests
build: default
tests: format
@echo "--> Running tests"
@go tool vet .
@go test -v ./...
tools:
@echo "--> Getting tools"
@$(foreach gotool,$(GOTOOLS),$(shell go get -u $(gotool)))
deps: bindata
@echo "--> Getting dependencies"
@go get -t -v ./...
install: deps
@echo "--> Build and install binary"
@go install -ldflags $(GOLDFLAGS) ./...
bindata: tools
@echo "--> Generate bindata"
@go-bindata -pkg tornote templates/... \
public/vendor/jquery/dist/jquery.slim.min.js \
public/vendor/sjcl/sjcl.js \
public/main.js \
public/styles.css
format:
@echo "--> Running go fmt"
@go fmt ./...
.PHONY: all deps format tests install bindata