feat: 版本发布日志

This commit is contained in:
TsMask
2024-01-19 18:04:51 +08:00
parent 8cc2529148
commit 37bb3bb0f6
2 changed files with 28 additions and 5 deletions

View File

@@ -31,10 +31,27 @@ replica-read-only no
192.168.1.120
altouser/a1t0U53r
## 开发
```sh
# 安装 Go版本 1.21.6 后进入项目根目录
cd ./restagent
# 下载依赖
go mod download
# 调试启动
go run restagent.go -c ./restagent/etc/restconf.yaml --env local
# 打包命名 restagent
go build -ldflags="-s -w" -o restagent
```
## 打包
`` bash
```sh
go env -w GOOS=linux
go env -w GOOS=windows
go build -o restagent -v -ldflags "-X 'ems.agt/lib/global.Version=2.2311.8' -X 'ems.agt/lib/global.BuildTime=`date`' -X 'ems.agt/lib/global.GoVer=`go version`'"
``
```