Makefile 834 B

1234567891011121314
  1. VERSION=$(shell git describe --tags | sed 's/^v//' )
  2. BUILD=$(shell date +%FT%T%z)
  3. #DEBIAN_IMAGE=debian-build:1.17-buster
  4. DEBIAN_IMAGE="debuild-with-libpcap-static:latest"
  5. all:
  6. docker run --rm -v $(PWD):/root/go/src/git.scraperwall.com/scw/munchclient -w /root/go/src/git.scraperwall.com/scw/munchclient registry.scw.systems/centos7-build:latest make compile
  7. all-debian:
  8. docker run --rm -v $(PWD):/go/src/git.scraperwall.com/scw/munchclient -w /go/src/git.scraperwall.com/scw/munchclient $(DEBIAN_IMAGE) make compile
  9. # docker run --rm -v $(PWD):/go/src/git.scraperwall.com/scw/munchclient -w /go/src/git.scraperwall.com/scw/munchclient registry.scw.systems/debian-build:latest make compile
  10. compile:
  11. env GOOS=linux GOARCH=amd64 go build -mod=vendor -tags netgo -ldflags "-s -X main.Version=$(VERSION) -X main.BuildDate=$(BUILD)"