Files
AI-Check-Test/scripts/build-class-checker.ps1
dongzi 2f8798c38c
Some checks failed
类变更检测 / class-change-check (push) Failing after 1s
脚本修改
2026-06-08 13:08:34 +08:00

26 lines
945 B
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 本地打包 class-checker 并复制到 .gitea/workflows/
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path)
$CheckerDir = Join-Path $Root ".gitea\class-checker"
$WorkflowsDir = Join-Path $Root ".gitea\workflows"
$TargetJar = Join-Path $CheckerDir "target\class-checker.jar"
$OutputJar = Join-Path $WorkflowsDir "class-checker.jar"
Write-Host ">> 编译 class-checker..."
Push-Location $Root
& mvn -q -f .gitea/class-checker/pom.xml package -DskipTests
if ($LASTEXITCODE -ne 0) {
Pop-Location
Write-Error "Maven 编译失败exit code: $LASTEXITCODE"
}
Pop-Location
if (-not (Test-Path $TargetJar)) {
Write-Error "编译失败,未找到 $TargetJar"
}
New-Item -ItemType Directory -Force -Path $WorkflowsDir | Out-Null
Copy-Item -Force $TargetJar $OutputJar
Write-Host ">> 已输出: $OutputJar"
Write-Host ">> 请 commit 并 push .gitea/workflows/class-checker.jar"