mirror of
https://github.com/whyour/qinglong.git
synced 2026-10-17 07:20:51 +08:00
fix: 修复页面升级、ql update 与静态资源版本同步 (#3086)
* fix: validate panel upgrades and synchronize versioned static builds * fix: add static-only mirror backfill workflow * fix: avoid lifecycle self-kill and stop cancelled upgrade groups * fix: build images when the shared upgrade engine changes * fix: dispatch upgrade lifecycle through a fixed script * fix: reclaim upgrade locks safely and normalize health probes * fix: match backend base URL normalization exactly
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Static branches are orphan snapshots. Fetch complete commits for the branch
|
||||
# that was built: a shallow/default-branch clone is rejected by mirror servers.
|
||||
set -euo pipefail
|
||||
destination=$1
|
||||
branch=$2
|
||||
ref_type=${3:-branch}
|
||||
git check-ref-format "refs/heads/$branch"
|
||||
workspace=$(mktemp -d)
|
||||
trap 'rm -rf "$workspace"' EXIT
|
||||
git init --bare "$workspace"
|
||||
fetch_refs=("+refs/heads/$branch:refs/heads/$branch")
|
||||
push_refs=("refs/heads/$branch:refs/heads/$branch")
|
||||
if [[ "$ref_type" == 'tag' ]]; then
|
||||
fetch_refs+=("+refs/tags/$branch:refs/tags/$branch")
|
||||
push_refs+=("refs/tags/$branch:refs/tags/$branch")
|
||||
fi
|
||||
git -C "$workspace" fetch --no-tags "${QL_STATIC_SOURCE:-https://github.com/whyour/qinglong-static.git}" \
|
||||
"${fetch_refs[@]}"
|
||||
git -C "$workspace" push --force "$destination" "${push_refs[@]}"
|
||||
Reference in New Issue
Block a user