Makefile 933 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # where to rsync builds
  2. DIST?=dist/publish
  3. DISTSUB=2020/05
  4. test: .PHONY
  5. go test -v $(shell go list ./... | grep -v /vendor/)
  6. testrace: .PHONY
  7. go test -v -race $(shell go list ./... | grep -v /vendor/)
  8. docker-test: .PHONY
  9. # test that we don't have missing dependencies
  10. docker run --rm -v `pwd`:/go/src/github.com/abh/geodns \
  11. -v /opt/local/share/GeoIP:/opt/local/share/GeoIP \
  12. golang:1.14-alpine3.11 -- \
  13. go test ./...
  14. sign:
  15. drone sign --save ntppool/geodns
  16. devel:
  17. go build -tags devel
  18. bench:
  19. go test -check.b -check.bmem
  20. TARS=$(wildcard dist/geodns-*-*.tar)
  21. push: $(TARS) install.sh
  22. rsync --exclude publish install.sh $(TARS) $(DIST)/$(DISTSUB)/
  23. $(DIST)/../push
  24. builds: linux-build linux-build-i386 freebsd-build push
  25. linux-build:
  26. GOOS=linux GOARCH=amd64 ./build
  27. linux-build-i386:
  28. GOOS=linux GOARCH=386 ./build
  29. freebsd-build:
  30. GOOS=freebsd GOARCH=amd64 ./build
  31. GOOS=freebsd GOARCH=386 ./build
  32. .PHONY: