flnxi-Wu/scripts/deploy/run-deploy-temp.ps1
WuYongJie f646b71813
Some checks failed
CI Check / check (push) Has been cancelled
chore: 初始化本地仓库并同步最近改动
2025-11-18 17:50:16 +08:00

24 lines
785 B
PowerShell

# Temporary deploy script to avoid encoding issues
$ErrorActionPreference = "Stop"
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$deployScripts = Get-ChildItem -Path $scriptDir -Filter "*.ps1"
# Find the deploy script with Chinese name
$deployScript = $deployScripts | Where-Object {
$name = $_.Name
$content = Get-Content $_.FullName -Raw -ErrorAction SilentlyContinue
if ($content -match "安全部署脚本" -or $content -match "直接上传源代码") {
return $true
}
return $false
} | Select-Object -First 1
if ($deployScript) {
Write-Host "Found deploy script: $($deployScript.Name)" -ForegroundColor Green
& $deployScript.FullName
} else {
Write-Host "Error: Deploy script not found" -ForegroundColor Red
exit 1
}