mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +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:
@@ -3,6 +3,9 @@
|
||||
# GitHub repo used for release downloads
|
||||
REPO="Sagit-chu/flux-panel"
|
||||
|
||||
# 固定版本号(Release 构建时自动填充,留空则获取最新版)
|
||||
PINNED_VERSION=""
|
||||
|
||||
# 获取系统架构
|
||||
get_architecture() {
|
||||
ARCH=$(uname -m)
|
||||
@@ -85,6 +88,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