常规升级

This commit is contained in:
2026-07-07 13:39:55 +08:00
parent e802d0c995
commit 343414650e
2 changed files with 11 additions and 8 deletions
+7 -7
View File
@@ -1,8 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$root"
origin="$(git remote get-url origin)"
origin="${origin%/}"
remote_root="$(printf '%s\n' "$origin" | sed -E 's#/[^/]+(\.git)?$##')"
fetch_repo() {
local repo="$1"
local branch="$2"
@@ -17,14 +19,12 @@ fetch_repo() {
git clone --branch "$branch" --single-branch "$repo" "$dir"
fi
}
fetch_repo_ex() {
local name="$1"
repo="http://192.168.1.75:3000/psc/${name}"
branch="master"
fetch_repo "${repo}" "$branch" "third_party/${name}"
local repo="${remote_root}/${name}"
local branch="master"
fetch_repo "$repo" "$branch" "third_party/${name}"
}
fetch_repo_ex "build_infra"
fetch_repo_ex "CPP_Core"
fetch_repo_ex "SSR"
fetch_repo_ex "SSR"