forked from meltwater/secretary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (27 loc) · 778 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
export GO15VENDOREXPERIMENT=1
VERSION := $(shell git describe --tags)
all: tools deps fmt build test lint
tools:
go get -u golang.org/x/tools/cmd/cover
go get -u github.com/golang/lint/golint
go get -u github.com/Masterminds/glide
deps:
glide install
# http://golang.org/cmd/go/#hdr-Run_gofmt_on_package_sources
fmt:
go fmt ./...
build:
CGO_ENABLED=0 go build -o "secretary-`uname -s`-`uname -m`" \
-ldflags "-X main.version=${VERSION}"
ln -sf "secretary-`uname -s`-`uname -m`" secretary
test:
go test -bench=. -v -coverprofile=coverage.txt -covermode=atomic
lint:
golint
clean:
rm -f ./secretary
docker:
docker build -t comptel/secretary:${VERSION} .
docker-push:
docker push comptel/secretary:${VERSION}
.PHONY: tools deps fmt build test lint clean