24 lines
785 B
PowerShell
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
|
|
}
|