1 Star 0 Fork 50

zhanglei/aginx

forked from haiker/aginx 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
haiker 提交于 2020-07-10 22:06 . webui server manager 管理方式
.PHONY: build release clean docker sync-consul sync-etcd sync-zk
binout=bin/aginx
Version=$(shell git describe --tags `git rev-list --tags --max-count=1`)
BuildDate=$(shell date +"%F %T")
GitCommit=$(shell git rev-parse HEAD)
debug=-w -s
param=-X main.VERSION=${Version} -X main.GITLOG_VERSION=${GitCommit} -X 'main.BUILD_TIME=${BuildDate}'
build:
go build -ldflags "${debug} ${param}" -o ${binout}
docker:
docker build --build-arg LDFLAGS="${debug} ${param}" -t xhaiker/aginx:${Version} -t xhaiker/aginx .
sync-consul: build
./bin/aginx -d sync consul://127.0.0.1:8500/aginx
sync-etcd: build
./bin/aginx -d sync etcd://127.0.0.1:2379/aginx
sync-zk: build
./bin/aginx -d sync zk://127.0.0.1:2181/aginx
gen:
make -C ui
go generate ui/generator.go
release: gen
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags bindata -ldflags "${debug} ${param}" -o bin/aginx-linux-amd64-${Version} aginx.go
tar -czvf bin/aginx-linux-amd64-${Version}.tar.gz bin/aginx-linux-amd64-${Version}
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -tags bindata -ldflags "${debug} ${param}" -o bin/aginx-darwin-amd64-${Version} aginx.go
tar -czvf bin/aginx-darwin-amd64-${Version}.tar.gz bin/aginx-darwin-amd64-${Version}
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -tags bindata -ldflags "${debug} ${param}" -o bin/aginx-windows-amd64-${Version}.exe aginx.go
zip bin/aginx-windows-amd64-${Version}.zip bin/aginx-windows-amd64-${Version}.exe
clean:
@rm -rf bin
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/zhanglei/aginx.git
git@gitee.com:zhanglei/aginx.git
zhanglei
aginx
aginx
master

搜索帮助