2014-05-06 05:34:24 +00:00
|
|
|
DEPS = $(shell go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
|
2014-05-06 05:38:21 +00:00
|
|
|
PACKAGES = $(shell go list ./...)
|
2013-12-06 23:43:07 +00:00
|
|
|
|
2014-05-06 05:45:54 +00:00
|
|
|
all: deps format
|
2013-12-06 23:43:07 +00:00
|
|
|
@mkdir -p bin/
|
|
|
|
@bash --norc -i ./scripts/build.sh
|
|
|
|
|
|
|
|
cov:
|
|
|
|
gocov test ./... | gocov-html > /tmp/coverage.html
|
|
|
|
open /tmp/coverage.html
|
|
|
|
|
|
|
|
deps:
|
2014-05-06 05:45:54 +00:00
|
|
|
@echo "--> Installing build dependencies"
|
|
|
|
@go get -d -v ./...
|
|
|
|
@echo $(DEPS) | xargs -n1 go get -d
|
2013-12-06 23:43:07 +00:00
|
|
|
|
|
|
|
test: deps
|
2014-10-09 18:31:28 +00:00
|
|
|
./scripts/verify_no_uuid.sh
|
2014-12-06 02:47:23 +00:00
|
|
|
go list ./... | xargs -n1 go test
|
2013-12-06 23:43:07 +00:00
|
|
|
|
|
|
|
integ:
|
2014-12-06 02:47:23 +00:00
|
|
|
go list ./... | INTEG_TESTS=yes xargs -n1 go test
|
|
|
|
|
|
|
|
cover: deps
|
|
|
|
./scripts/verify_no_uuid.sh
|
|
|
|
go list ./... | xargs -n1 go test --cover
|
2013-12-06 23:43:07 +00:00
|
|
|
|
2014-06-03 12:54:04 +00:00
|
|
|
format: deps
|
2014-05-06 05:45:54 +00:00
|
|
|
@echo "--> Running go fmt"
|
|
|
|
@go fmt $(PACKAGES)
|
2014-05-06 05:38:21 +00:00
|
|
|
|
2013-12-06 23:43:07 +00:00
|
|
|
web:
|
|
|
|
./scripts/website_run.sh
|
|
|
|
|
|
|
|
web-push:
|
|
|
|
./scripts/website_push.sh
|
|
|
|
|
2014-06-30 01:22:44 +00:00
|
|
|
.PHONY: all cov deps integ test web web-push
|