ci(docker): 将脚本中的中文注释和输出信息改为英文
Some checks failed
Build Windows / ACT Windows Checkout Verification (push) Successful in 7h0m13s
Build Windows / 编译 libcore (Windows) (20.15.1) (push) Failing after 17s
Build Windows / build (push) Has been skipped

This commit is contained in:
shanshanzhong 2025-11-07 04:53:22 -08:00
parent 62d3157665
commit eb4db67fa1

View File

@ -239,43 +239,43 @@ jobs:
- name: 🔍 Verify jq Installation (ACT) - name: 🔍 Verify jq Installation (ACT)
shell: powershell shell: powershell
run: | run: |
# 检查 jq 是否可用 # Check if jq is available
$jqFound = $false $jqFound = $false
try { try {
$version = jq --version 2>&1 $version = jq --version 2>&1
if ($version -match 'jq-[\d\.]+') { if ($version -match 'jq-[\d\.]+') {
Write-Host "✅ jq 已安装: $version" Write-Host "jq is already installed: $version"
$jqFound = $true $jqFound = $true
} }
} catch { } catch {
Write-Host "❌ jq 未安装或不在 PATH 中" Write-Host "jq not installed or not in PATH"
} }
if (-not $jqFound) { if (-not $jqFound) {
Write-Host "⚠️ 准备安装 jq..." Write-Host "Preparing to install jq..."
# 检查 Chocolatey 是否可用 # Check if Chocolatey is available
$chocoFound = $false $chocoFound = $false
try { try {
choco --version 2>&1 | Out-Null choco --version 2>&1 | Out-Null
$chocoFound = $true $chocoFound = $true
} catch {} } catch {}
if (-not $chocoFound) { if (-not $chocoFound) {
Write-Host "📦 安装 Chocolatey..." Write-Host "Installing Chocolatey..."
Set-ExecutionPolicy Bypass -Scope Process -Force Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# 刷新 PATH # Refresh PATH
$env:PATH = [System.Environment]::GetEnvironmentVariable("PATH", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("PATH", "User") $env:PATH = [System.Environment]::GetEnvironmentVariable('PATH', 'Machine') + ';' + [System.Environment]::GetEnvironmentVariable('PATH', 'User')
Write-Host "✅ Chocolatey 安装完成" Write-Host "Chocolatey installed successfully"
} }
Write-Host "📦 使用 Chocolatey 安装 jq..." Write-Host "Installing jq using Chocolatey..."
choco install jq -y choco install jq -y
if ($LASTEXITCODE -eq 0) { if ($LASTEXITCODE -eq 0) {
Write-Host "✅ jq 安装成功" Write-Host "jq installed successfully"
# 再次验证 # Verify again
$version = jq --version 2>&1 $version = jq --version 2>&1
Write-Host "✅ jq 版本: $version" Write-Host "jq version: $version"
} else { } else {
Write-Host "❌ jq 安装失败,退出码: $LASTEXITCODE" Write-Host "jq installation failed, exit code: $LASTEXITCODE"
exit 1 exit 1
} }
} }