refactor(installers): extract PRIVATE_CONFIG_BASE in sh scripts (DRY)

This commit is contained in:
delta-cloud-208e
2026-04-25 16:43:59 +00:00
parent 8924b75e91
commit 31f9c3e1a8
6 changed files with 12 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ set -euo pipefail
GITEA_TOKEN="${GITEA_TOKEN:-cadffcb0a6a3be728ac1ff619bb40c86588f6837}"
REPO_RAW="https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen"
PRIVATE_CONFIG_BASE="https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main"
REGISTRY_URL="https://npm.sensey24.ru/"
NPM_SCOPE="@qwen-code"
NPM_PACKAGE="@qwen-code/qwen-code"
@@ -209,7 +210,7 @@ trap cleanup EXIT
info "Downloading patcher..."
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$REPO_RAW/qwen_patcher.py" -o "$INSTALL_DIR/qwen_patcher.py"
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main/qwen_config.json" -o "$INSTALL_DIR/qwen_config.json"
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$PRIVATE_CONFIG_BASE/qwen_config.json" -o "$INSTALL_DIR/qwen_config.json"
log "Patcher downloaded"
info "Applying patches (settings + env)..."

View File

@@ -11,6 +11,7 @@ REGISTRY_URL="https://npm.sensey24.ru/"
NPM_SCOPE="@qwen-code"
NPM_PACKAGE="@qwen-code/qwen-code"
REPO_RAW="https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen"
PRIVATE_CONFIG_BASE="https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main"
OS="$(uname -s)"
IS_MACOS=false
@@ -133,7 +134,7 @@ trap cleanup EXIT
info "Downloading patcher..."
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$REPO_RAW/qwen_patcher.py" -o "$TEMP_DIR/qwen_patcher.py"
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main/qwen_config.json" -o "$TEMP_DIR/qwen_config.json"
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$PRIVATE_CONFIG_BASE/qwen_config.json" -o "$TEMP_DIR/qwen_config.json"
info "Applying patches..."
python3 "$TEMP_DIR/qwen_patcher.py" --settings-only --config "$TEMP_DIR/qwen_config.json"