mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-09 11:16:37 +08:00
feat(install): support version-pinned install from release assets
Add PINNED_VERSION mechanism so scripts downloaded from a specific release (e.g. 2.1.0) install that exact version instead of latest. CI injects the version via sed during release build. Users can still override with VERSION= env var. Update release notes and README to show both pinned and latest install options.
This commit is contained in:
@@ -10,6 +10,9 @@ export LC_ALL=C
|
||||
# GitHub repo used for release downloads
|
||||
REPO="Sagit-chu/flux-panel"
|
||||
|
||||
# 固定版本号(Release 构建时自动填充,留空则获取最新版)
|
||||
PINNED_VERSION=""
|
||||
|
||||
COUNTRY=$(curl -s https://ipinfo.io/country)
|
||||
|
||||
maybe_proxy_url() {
|
||||
@@ -69,6 +72,10 @@ resolve_version() {
|
||||
echo "$FLUX_VERSION"
|
||||
return 0
|
||||
fi
|
||||
if [[ -n "${PINNED_VERSION:-}" ]]; then
|
||||
echo "$PINNED_VERSION"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if resolve_latest_release_tag; then
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user