-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (32 loc) · 1.11 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
GO ?= godep go
COVERAGEDIR = ./coverage
all: build test cover
godep:
go get github.com/tools/godep
godep-save:
godep save ./...
all: build test
build:
if [ ! -d bin ]; then mkdir bin; fi
$(GO) build -v -o bin/aprs-dashboard
fmt:
$(GO) fmt ./...
test:
if [ ! -d $(COVERAGEDIR) ]; then mkdir $(COVERAGEDIR); fi
$(GO) test -v ./handlers -race -cover -coverprofile=$(COVERAGEDIR)/handlers.coverprofile
$(GO) test -v ./ingest -cover -coverprofile=$(COVERAGEDIR)/ingest.coverprofile
$(GO) test -v ./parser -race -cover -coverprofile=$(COVERAGEDIR)/parser.coverprofile
cover:
$(GO) tool cover -html=$(COVERAGEDIR)/handlers.coverprofile -o $(COVERAGEDIR)/handlers.html
$(GO) tool cover -html=$(COVERAGEDIR)/ingest.coverprofile -o $(COVERAGEDIR)/ingest.html
$(GO) tool cover -html=$(COVERAGEDIR)/parser.coverprofile -o $(COVERAGEDIR)/parser.html
bench:
$(GO) test ./... -cpu 2 -bench .
run: build
$(CURDIR)/aprs-dashboard
docker-build:
docker info
docker build -t urlgrey/aprs-dashboard:latest .
docker-deploy:
docker login -e ${DOCKER_EMAIL} -u ${DOCKER_USER} -p ${DOCKER_PASS}
docker push urlgrey/aprs-dashboard:latest