mirror of
https://github.com/hackerschoice/segfault.git
synced 2024-06-27 09:18:41 +00:00
logpipe
This commit is contained in:
parent
e0bef1c6f6
commit
214304494c
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