mirror of
https://gitcode.com/JianFeeeee/webui4frpc.git
synced 2026-09-24 10:57:57 +00:00
chore: v0.1.1 — 版本号收拢进 internal/version + 发布脚本校验和覆盖安装包
- 新增 internal/version 包作为版本号唯一来源,release.sh 通过 -ldflags -X 注入真实 tag。此前 /api/manager/status 与集群 JoinInfo 里各自硬编码 "0.1.0",产物报告的版本与 tag 无关。 - release.sh:SHA256SUMS 移到原生安装包构建之后统一重算,覆盖 deb/rpm/setup.exe/pkg。此前只算 tar.gz/zip,用户校验安装包会得到 "no file was verified"(v0.1.0 发布时实际踩到)。 - rpm spec / build_installers.sh 默认版本与 changelog、README 安装 示例文件名同步到 0.1.1。 验证:go test ./internal/cluster/... ./internal/httpapi/... 通过; 6 平台产物架构逐个 file 校验正确;linux-amd64 实跑 /status 报告 version=0.1.1(确认 ldflags 注入生效)。
This commit is contained in:
@ -25,6 +25,7 @@ import (
|
||||
"webui4frpc/internal/process"
|
||||
"webui4frpc/internal/render"
|
||||
"webui4frpc/internal/store"
|
||||
"webui4frpc/internal/version"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -132,7 +133,7 @@ func main() {
|
||||
}
|
||||
var ring *cluster.Engine
|
||||
ring = cluster.NewEngine(
|
||||
selfID, selfID, *user, *pass, "0.1.0", nil,
|
||||
selfID, selfID, *user, *pass, version.Version, nil,
|
||||
&cluster.AppHandler{
|
||||
LoadFn: func() (float64, float64) {
|
||||
// NetPct: real NIC saturation from /proc/net/dev deltas vs
|
||||
@ -533,7 +534,7 @@ func main() {
|
||||
// CreateCluster so the node is at least functional as standalone.
|
||||
func retryJoinCluster(ctx context.Context, ring *cluster.Engine, targetAddr, joinKey string) {
|
||||
selfNode := ring.State().Nodes[0]
|
||||
ji := cluster.JoinInfo{ID: selfNode.ID, Addr: selfNode.Addr, Version: "0.1.0", JoinKey: joinKey}
|
||||
ji := cluster.JoinInfo{ID: selfNode.ID, Addr: selfNode.Addr, Version: version.Version, JoinKey: joinKey}
|
||||
deadline := time.NewTimer(5 * time.Minute)
|
||||
defer deadline.Stop()
|
||||
ticker := time.NewTicker(10 * time.Second)
|
||||
@ -593,7 +594,7 @@ func retryRejoinCached(ctx context.Context, ring *cluster.Engine, peersJSON stri
|
||||
return
|
||||
}
|
||||
for _, p := range peers {
|
||||
ji := cluster.JoinInfo{ID: selfNode.ID, Addr: selfNode.Addr, Version: "0.1.0", JoinKey: p.Key}
|
||||
ji := cluster.JoinInfo{ID: selfNode.ID, Addr: selfNode.Addr, Version: version.Version, JoinKey: p.Key}
|
||||
jc, cancel := context.WithTimeout(ctx, 8*time.Second)
|
||||
err := ring.JoinRing(jc, p.Addr, ji)
|
||||
cancel()
|
||||
|
||||
Reference in New Issue
Block a user