1 Star 0 Fork 0

nmgliangwei/gotop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 689 Bytes
一键复制 编辑 原始数据 按行查看 历史
Caleb Bassi 提交于 2018-10-22 20:26 . Change 'make default' to 'make all'
VERSION=$(shell awk '/([0-9]{1}.?){3}/ {print $$4;}' main.go)
.PHONY: all
all: dist/gotop.rpm dist/gotop.deb
dist/gotop:
@GOOS=linux GOARCH=amd64 go build -o $@
dist:
@mkdir $@
dist/gotop.rpm: dist dist/gotop
@docker run --rm \
-v "$(PWD)/build:/tmp/build" \
-v "$(PWD)/dist:/tmp/dist" \
-e "VERSION=$(VERSION)" \
goreleaser/nfpm pkg \
--config /tmp/build/gotop-nfpm.yml \
--target /tmp/dist/gotop.rpm
dist/gotop.deb: dist dist/gotop
@docker run --rm \
-v "$(PWD)/build:/tmp/build" \
-v "$(PWD)/dist:/tmp/dist" \
-e "VERSION=$(VERSION)" \
goreleaser/nfpm pkg \
--config /tmp/build/gotop-nfpm.yml \
--target /tmp/dist/gotop.deb
.PHONY: clean
clean:
@-rm -rf dist
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/iliangwei/gotop.git
git@gitee.com:iliangwei/gotop.git
iliangwei
gotop
gotop
master

搜索帮助