forked from abh/geodns
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (30 loc) · 895 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
# where to rsync builds
DIST?=dist/publish
DISTSUB=2019/04
test: .PHONY
go test -v $(shell go list ./... | grep -v /vendor/)
testrace: .PHONY
go test -v -race $(shell go list ./... | grep -v /vendor/)
docker-test: .PHONY
# test that we don't have missing dependencies
docker run --rm -v `pwd`:/go/src/github.com/abh/geodns \
-v /opt/local/share/GeoIP:/opt/local/share/GeoIP \
golang:1.10.1-alpine3.7 \
go test ./...
devel:
go build -tags devel
bench:
go test -check.b -check.bmem
TARS=$(wildcard dist/geodns-*-*.tar)
push: $(TARS) tmp-install.sh
rsync --exclude publish tmp-install.sh $(TARS) $(DIST)/$(DISTSUB)/
$(DIST)/push
builds: linux-build linux-build-i386 freebsd-build push
linux-build:
GOOS=linux GOARCH=amd64 ./build
linux-build-i386:
GOOS=linux GOARCH=386 ./build
freebsd-build:
GOOS=freebsd GOARCH=amd64 ./build
GOOS=freebsd GOARCH=386 ./build
.PHONY: