mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-04 20:25:16 +03:00
fix(panel): recognize this fork's -awg.N tags in version comparison
internal/config/version was never bumped past 3.5.0 when v3.5.0-awg.1 was tagged, so a freshly-updated panel kept reporting its own version as the plain upstream base. On top of that, parseVersionParts (Go and its TypeScript mirror) required exactly 3 dot-separated numeric parts, so it rejected the -awg.N suffix entirely and fell back to a raw string inequality that reports "update available" any time the strings merely differ -- which they always do here, even when already on the latest tag. Bump the embedded version to 3.5.0-awg.1 and extend both parsers to treat "-awg.N" as an optional 4th, lower-priority component (defaulting to 0 for a plain tag), so e.g. 3.5.0-awg.2 > 3.5.0-awg.1 > 3.5.0 and a matching tag compares equal instead of always looking outdated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,13 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// version must be bumped to match the exact tag BEFORE it's pushed -- unlike
|
||||
// buildCommit/buildDate below, nothing stamps this automatically for a
|
||||
// tagged release build, so a forgotten bump here makes the panel misreport
|
||||
// its own version and permanently show a bogus "update available" (the
|
||||
// already-installed tag never matches this stale string). See
|
||||
// isNewerVersion/parseVersionParts in internal/web/service/panel/panel.go.
|
||||
//
|
||||
//go:embed version
|
||||
var version string
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.5.0
|
||||
3.5.0-awg.1
|
||||
Reference in New Issue
Block a user