This commit is contained in:
SkyperTHC 2023-11-01 11:07:14 +00:00
parent 0c23595e41
commit d1492ff896
No known key found for this signature in database
GPG Key ID: A9BD386DF9113CD6

28
tools/logpipe/Makefile Normal file

@ -0,0 +1,28 @@
VERSION := $(shell git rev-parse --short HEAD)
BUILDTIME := $(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
GOLDFLAGS += -s -w
GOLDFLAGS += -X main.Version=$(VERSION)
GOLDFLAGS += -X main.Buildtime=$(BUILDTIME)
GOFLAGS = -ldflags "$(GOLDFLAGS)"
all:
docker build --network host -t sf-logpipe .
build: pre
GOOS=linux GOARCH=amd64 go build $(GOFLAGS)
build-arm: pre
GOOS=linux GOARCH=arm go build -o cg-arm
pre:
go mod tidy
docker: all
docker run -it --rm sf-logpipe
release: build
sha256sum cg | tee cg.sum
tar czvf cg.tgz cg cg.sum
rm -f cg cg.sum
git add cg.tgz