1 Star 0 Fork 170

心随雨下 / 物联大师

forked from 杰神 / 物联大师 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
demo.sh 634 Bytes
一键复制 编辑 原始数据 按行查看 历史
杰神 提交于 2023-09-01 20:07 . 升级mochi,删除前端
#编译前端
#npm run build
# 整体编译
go env -w GOPROXY=https://goproxy.cn,direct
go env -w GOPRIVATE=*.gitlab.com,*.gitee.com
go env -w GOSUMDB=off
app="iot-master"
pkg="github.com/zgwit/iot-master/v4/pkg/build"
gitTag=$(git tag -l | tail -n 1)
gitHash=$(git show -s --format=%H)
buildTime=$(date -d today +"%Y-%m-%d %H:%M:%S")
# -w -s
ldflags="-X '${pkg}.Version=$gitTag' \
-X '${pkg}.GitHash=$gitHash' \
-X '${pkg}.Build=$buildTime'"
export GOARCH=amd64
export GOOS=windows
go build -ldflags "$ldflags" -o iot-master.exe cmd/demo/main.go
export GOOS=linux
go build -ldflags "$ldflags" -o iot-master cmd/demo/main.go
Go
1
https://gitee.com/Seamless2018/iot-master.git
git@gitee.com:Seamless2018/iot-master.git
Seamless2018
iot-master
物联大师
master

搜索帮助