-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (32 loc) · 891 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
CURRENT := $(shell pwd)
BINARY = http-signal-proxy
PACKAGES = $(shell go list ./...)
BUILDDIR=./build
BINDIR=$(BUILDDIR)/bin
PKGDIR=$(BUILDDIR)/pkg
DISTDIR=$(PKGDIR)/dist
VERSION := $(shell git describe --tags --abbrev=0)
GOXOS := "darwin,linux"
GOXARCH := "386,amd64"
GOXOUTPUT := "$(PKGDIR)/$(VERSION)"
setup: dep
go get github.com/motemen/gobump/cmd/gobump
go get -u github.com/tcnksm/ghr
go get github.com/Songmu/goxz/cmd/goxz
dep:
@dep ensure -v
build:
@go build -o $(BINDIR)/$(BINARY)
test:
@go test -v -parallel=4 $(PACKAGES)
lint:
@golint $(PACKAGES)
vet:
@go vet $(PACKAGES)
coverage:
@go test -v -race -cover -covermode=atomic -coverprofile=coverage.txt $(PACKAGES)
release: package
ghr $(VERSION) $(GOXOUTPUT)
package:
goxz -os=$(GOXOS) -arch=$(GOXARCH) -d=$(GOXOUTPUT) -pv=${VERSION}
.PHONY: dep build container push test lint vet coverage package release