2020-04-06 04:02:32 +00:00
|
|
|
GOOS ?= linux
|
|
|
|
GOARCH ?= amd64
|
|
|
|
|
|
|
|
go-build:
|
2020-04-06 13:53:21 +00:00
|
|
|
go build ${BUILD_OPTS} -o bin/home-dns-${GOOS}-${GOARCH}
|
2020-04-06 04:02:32 +00:00
|
|
|
|
|
|
|
go-clean:
|
|
|
|
go clean -x
|
|
|
|
|
|
|
|
go-test: go-build
|
|
|
|
go test ${BUILD_OPTS} -cover ./...
|
|
|
|
|
|
|
|
git-push:
|
|
|
|
git push github
|
|
|
|
git push gitlab
|
|
|
|
|
|
|
|
bundle-all:
|
|
|
|
# generate hash file
|
|
|
|
echo "path bytes sha256" | tee ./bin/hashes
|
2020-04-06 13:53:21 +00:00
|
|
|
find ./bin/ -name "home-dns-*" -type f -printf '%p %s ' -exec sh -c 'sha256sum $$1 | cut -d " " -f 1;' find-exec {} \; \
|
2020-04-06 04:02:32 +00:00
|
|
|
| tee -a ./bin/hashes
|
|
|
|
# compress
|
2020-04-06 13:53:21 +00:00
|
|
|
tar -cvf bin/home-dns-all.tgz ./bin/*
|
|
|
|
gzip ./bin/home-dns-darwin-* || true
|
|
|
|
gzip ./bin/home-dns-linux-* || true
|
2020-04-06 04:02:32 +00:00
|
|
|
# do not gzip windows binaries
|
|
|
|
|
|
|
|
bundle-clean:
|
|
|
|
rm -v ./bin/hashes || true
|
2020-04-06 13:53:21 +00:00
|
|
|
rm -v ./bin/home-dns-* || true
|