refactor(installers): extract PRIVATE_CONFIG_BASE in sh scripts (DRY)
This commit is contained in:
@@ -10,6 +10,7 @@ set -euo pipefail
|
||||
|
||||
GITEA_TOKEN="${GITEA_TOKEN:-cadffcb0a6a3be728ac1ff619bb40c86588f6837}"
|
||||
REPO_RAW="https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/gemini"
|
||||
PRIVATE_CONFIG_BASE="https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main"
|
||||
REGISTRY_URL="https://npm.sensey24.ru/"
|
||||
NPM_SCOPE="@google"
|
||||
NPM_PACKAGE="@google/gemini-cli"
|
||||
@@ -203,7 +204,7 @@ trap cleanup EXIT
|
||||
|
||||
info "Downloading patcher..."
|
||||
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$REPO_RAW/gemini_patcher.py" -o "$INSTALL_DIR/gemini_patcher.py"
|
||||
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main/gemini_config.json" -o "$INSTALL_DIR/gemini_config.json"
|
||||
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$PRIVATE_CONFIG_BASE/gemini_config.json" -o "$INSTALL_DIR/gemini_config.json"
|
||||
log "Patcher downloaded"
|
||||
|
||||
info "Applying patches..."
|
||||
|
||||
@@ -10,6 +10,7 @@ REGISTRY_URL="https://npm.sensey24.ru/"
|
||||
NPM_SCOPE="@google"
|
||||
NPM_PACKAGE="@google/gemini-cli"
|
||||
REPO_RAW="https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/gemini"
|
||||
PRIVATE_CONFIG_BASE="https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main"
|
||||
|
||||
IS_MACOS=false
|
||||
[ "$(uname -s)" = "Darwin" ] && IS_MACOS=true
|
||||
@@ -122,7 +123,7 @@ trap cleanup EXIT
|
||||
|
||||
info "Downloading patcher..."
|
||||
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$REPO_RAW/gemini_patcher.py" -o "$TEMP_DIR/gemini_patcher.py"
|
||||
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main/gemini_config.json" -o "$TEMP_DIR/gemini_config.json"
|
||||
curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$PRIVATE_CONFIG_BASE/gemini_config.json" -o "$TEMP_DIR/gemini_config.json"
|
||||
|
||||
info "Applying patches..."
|
||||
python3 "$TEMP_DIR/gemini_patcher.py" --apply --config "$TEMP_DIR/gemini_config.json"
|
||||
|
||||
Reference in New Issue
Block a user