删除子模块 改用自定义脚本

This commit is contained in:
2026-07-06 14:11:34 +08:00
parent f8cbd454a2
commit 7f03e90068
5 changed files with 41 additions and 6 deletions
+1
View File
@@ -1,5 +1,6 @@
/sqlite/ /sqlite/
/data/ /data/
/.idea /.idea
/third_party
-6
View File
@@ -1,6 +0,0 @@
[submodule "third_party/CPP_Core"]
path = third_party/CPP_Core
url = http://192.168.1.75:3000/psc/CPP_Core.git
[submodule "third_party/SSR"]
path = third_party/SSR
url = http://192.168.1.75:3000/psc/SSR.git
View File
View File
+40
View File
@@ -0,0 +1,40 @@
$ErrorActionPreference = "Stop"
$scriptDir = $PSScriptRoot
if ( [string]::IsNullOrWhiteSpace($scriptDir))
{
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
}
$root = (Resolve-Path -LiteralPath (Join-Path $scriptDir "..")).Path
Set-Location -LiteralPath $root
function Fetch-Repo
{
param(
[string]$Repo,
[string]$Branch,
[string]$Dir
)
if (Test-Path -LiteralPath $Dir -PathType Container)
{
git -C $Dir rev-parse --is-inside-work-tree *> $null
git -C $Dir remote set-url origin $Repo
git -C $Dir fetch origin $Branch
git -C $Dir checkout $Branch
git -C $Dir pull --ff-only origin $Branch
}
else
{
git clone --branch $Branch --single-branch $Repo $Dir
}
}
function Fetch-RepoEx
{
param(
[string]$Name
)
$repo = "http://192.168.1.75:3000/psc/$Name"
$branch = "master"
Fetch-Repo -Repo $repo -Branch $branch -Dir "third_party/$Name"
}
Fetch-RepoEx "build_infra"
Fetch-RepoEx "CPP_Core"
Fetch-RepoEx "SSR"