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

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# Placeholder for Scripts/Handles.sh
# Please download manually from: https://raw.githubusercontent.com/VIKINGYFY/OpenWRT-CI/main/Scripts/Handles.sh
# Or run: curl -fsSL https://raw.githubusercontent.com/VIKINGYFY/OpenWRT-CI/main/Scripts/Handles.sh -o Scripts/Handles.sh
set -euo pipefail
echo "Handles.sh placeholder - please download the actual script"

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# Placeholder for Scripts/Packages.sh
# Please download manually from: https://raw.githubusercontent.com/VIKINGYFY/OpenWRT-CI/main/Scripts/Packages.sh
# Or run: curl -fsSL https://raw.githubusercontent.com/VIKINGYFY/OpenWRT-CI/main/Scripts/Packages.sh -o Scripts/Packages.sh
set -euo pipefail
echo "Packages.sh placeholder - please download the actual script"

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# Placeholder for Scripts/Settings.sh
# Please download manually from: https://raw.githubusercontent.com/VIKINGYFY/OpenWRT-CI/main/Scripts/Settings.sh
# Or run: curl -fsSL https://raw.githubusercontent.com/VIKINGYFY/OpenWRT-CI/main/Scripts/Settings.sh -o Scripts/Settings.sh
set -euo pipefail
echo "Settings.sh placeholder - please下载 the actual script"

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})"