forked from vtrifonov/http-api-mock
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
47 lines (34 loc) · 845 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
40
41
42
43
44
45
46
47
.PHONY: build doc fmt lint dev test vet godep install bench bindata
PKG_NAME=$(shell basename `pwd`)
NS = trifonov
VERSION ?= latest
install:
go get -t -v ./...
build: bindata \
vet \
test
go build -v -o ./bin/$(PKG_NAME)
bindata:
go-bindata -pkg console -o console/bindata.go tmpl/*
doc:
godoc -http=:6060
fmt:
go-ls -exec="go fmt" ./...
# https://github.com/golang/lint
# go get github.com/golang/lint/golint
lint:
go-ls -exec="golint" ./...
test:
go-ls -exec="go test -v" ./...
coverage:
goverage -v -covermode count -coverprofile=coverage.out
go tool cover -html=coverage.out
# https://godoc.org/golang.org/x/tools/cmd/vet
vet:
go-ls -exec="go vet -v"
get-deps:
go get github.com/laher/gols/cmd/go-ls
glide install
release:
docker build -t $(NS)/$(PKG_NAME):$(VERSION) .
docker push $(NS)/$(PKG_NAME):$(VERSION)