refactor: update goreleaser

This commit is contained in:
ning 2023-03-24 17:37:35 +08:00
parent b96ff22a21
commit bc6616ce7c
3 changed files with 38 additions and 1 deletions

View File

@ -27,11 +27,25 @@ builds:
ldflags:
- -s -w
- -X github.com/ccfos/nightingale/v6/pkg/version.Version={{ .Tag }}-{{.Commit}}
- id: build-cli
main: ./cmd/cli/
binary: n9e-cli
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X github.com/ccfos/nightingale/v6/pkg/version.Version={{ .Tag }}-{{.Commit}}
archives:
- id: n9e
builds:
- build
- build-cli
format: tar.gz
format_overrides:
- goos: windows
@ -43,6 +57,7 @@ archives:
- etc/*
- pub/*
- integrations/*
- cli/*
- n9e.sql
release:

View File

@ -27,4 +27,7 @@ run_alert:
nohup ./n9e-alert > n9e-alert.log 2>&1 &
run_pushgw:
nohup ./n9e-pushgw > n9e-pushgw.log 2>&1 &
nohup ./n9e-pushgw > n9e-pushgw.log 2>&1 &
release:
goreleaser --skip-validate --skip-publish --snapshot

19
cli/upgrade/readme.md Normal file
View File

@ -0,0 +1,19 @@
# v5 升级 v6 手册
1. 解压 n9e 安装包
2. 导入 upgrade.sql 到 n9e_v5 数据库
```
mysql -h 127.0.0.1 -u root -p1234 < cli/upgrade/upgrade.sql
```
3. 执行 n9e-cli 完成数据库表结构升级, webapi.conf 为 v5 版本 n9e-webapi 正在使用的配置文件
```
./n9e-cli --upgrade --config webapi.conf
```
4. 修改 n9e 配置文件中的数据库为 n9e_v5启动 n9e 进程
```
nohup ./n9e &> n9e.log &
```
5. n9e 监听的端口为 17000如果想使用之前的端口可以在配置文件中将端口改为 18000