优化
This commit is contained in:
@@ -7,7 +7,9 @@ param(
|
||||
$ErrorActionPreference = "Stop"
|
||||
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
|
||||
$pom = Join-Path $repoRoot "pom.xml"
|
||||
$mapperScanContract = Join-Path $repoRoot "scripts/mapper-scan-contract.mjs"
|
||||
$requiredTests = @(
|
||||
"scripts/mapper-scan-contract.test.mjs",
|
||||
"firstleg/src/test/java/com/baiyue/firstleg/oceanbooking/controller/PlatformOceanBookingControllerContractTest.java",
|
||||
"firstleg/src/test/java/com/baiyue/firstleg/oceanbooking/service/OceanBookingServiceTest.java",
|
||||
"firstleg/src/test/java/com/baiyue/firstleg/repository/TruckAppointmentMapperContractTest.java",
|
||||
@@ -45,6 +47,10 @@ if (-not (Test-Path -LiteralPath $pom)) {
|
||||
Write-Error "Missing Maven pom: $pom"
|
||||
exit 2
|
||||
}
|
||||
if (-not (Test-Path -LiteralPath $mapperScanContract)) {
|
||||
Write-Error "Missing Mapper scan contract: $mapperScanContract"
|
||||
exit 2
|
||||
}
|
||||
|
||||
$missing = @($requiredTests | Where-Object { -not (Test-Path -LiteralPath (Join-Path $repoRoot $_)) })
|
||||
if ($missing.Count -gt 0) {
|
||||
@@ -60,6 +66,8 @@ if ($DryRun) {
|
||||
|
||||
Push-Location $repoRoot
|
||||
try {
|
||||
& node $mapperScanContract
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
& $MavenCommand @mavenArgs
|
||||
$code = $LASTEXITCODE
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user