refactor: upstream sync strategy with dynamic GENERAL.txt

This commit is contained in:
lingyuzeng
2026-03-01 14:03:58 +08:00
parent 6ee3e2f832
commit a54452915d
9 changed files with 213 additions and 52 deletions

18
Scripts/sync_upstream_config.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
# Sync GENERAL.txt from upstream davidtall/OpenWRT-CI
# This ensures we always get the latest upstream config
mkdir -p Config
# Optional: Pin to a specific commit for reproducible builds
# Set UPSTREAM_GENERAL_REF to a commit hash or branch name
# Default: 'main' (always latest)
UPSTREAM_GENERAL_REF="${UPSTREAM_GENERAL_REF:-main}"
curl -fsSL \
"https://raw.githubusercontent.com/davidtall/OpenWRT-CI/${UPSTREAM_GENERAL_REF}/Config/GENERAL.txt" \
-o "Config/GENERAL.upstream.txt"
echo "Synced GENERAL.txt from davidtall/OpenWRT-CI (${UPSTREAM_GENERAL_REF})"