1 Star 0 Fork 0

WeBank/wecube-plugins-notifications

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
广意 提交于 2020-11-12 19:23 . Add makefile
current_dir=$(shell pwd)
version=$(PLUGIN_VERSION)
project_name=$(shell basename "${current_dir}")
clean:
rm -rf wecube-plugins-notifications
build: clean
chmod +x ./build/*.sh
docker run --rm -v $(current_dir):/go/src/github.com/WeBankPartners/$(project_name) --name build_$(project_name) golang:1.12.5 /bin/bash /go/src/github.com/WeBankPartners/$(project_name)/build/build.sh
image: build
docker build -t $(project_name):$(version) .
package: image
cp build/register.xml ./
sed -i "s~{{PLUGIN_VERSION}}~$(version)~g" ./register.xml
docker save -o image.tar $(project_name):$(version)
zip wecube-plugins-notification-$(version).zip image.tar register.xml
rm -f register.xml
rm -rf ./*.tar
docker rmi $(project_name):$(version)
upload: package
$(eval container_id:=$(shell docker run -v $(current_dir):/package -itd --entrypoint=/bin/sh minio/mc))
docker exec $(container_id) mc config host add wecubeS3 $(s3_server_url) $(s3_access_key) $(s3_secret_key) wecubeS3
docker exec $(container_id) mc cp /package/wecube-plugins-notification-$(version).zip wecubeS3/wecube-plugin-package-bucket
docker rm -f $(container_id)
rm -rf wecube-plugins-notification-$(version).zip
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/WeBank/wecube-plugins-notifications.git
git@gitee.com:WeBank/wecube-plugins-notifications.git
WeBank
wecube-plugins-notifications
wecube-plugins-notifications
master

搜索帮助