mirror of
https://github.com/hackerschoice/segfault.git
synced 2024-06-16 11:58:43 +00:00
logpipe
This commit is contained in:
parent
0c23595e41
commit
d1492ff896
28
tools/logpipe/Makefile
Normal file
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
|
Loading…
Reference in New Issue
Block a user