feat: 版本发布日志
This commit is contained in:
21
README.md
21
README.md
@@ -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`'"
|
||||
``
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user