categraf/Makefile

18 lines
528 B
Makefile
Raw Normal View History

2022-05-29 17:37:57 +08:00
.PHONY: start build
APP = categraf
VER = 0.1.0
all: build
build:
go build -ldflags "-w -s -X flashcat.cloud/categraf/config.Version=$(VER)"
pack:
env GOOS=linux GOARCH=amd64 go build -ldflags "-w -s -X flashcat.cloud/categraf/config.VERSION=$(VER)"
env GOOS=windows GOARCH=amd64 go build -ldflags "-w -s -X flashcat.cloud/categraf/config.VERSION=$(VER)"
rm -rf $(APP)-$(VER).tar.gz
rm -rf $(APP)-$(VER).zip
2022-05-29 18:10:07 +08:00
tar -zcvf $(APP)-$(VER)-linux-amd64.tar.gz conf $(APP)
zip -r $(APP)-$(VER)-windows-amd64.zip conf $(APP).exe