feat(M01-B): 建立核心迁移与MySQL连接池
This commit is contained in:
@@ -4,6 +4,8 @@ $head = (& git rev-parse HEAD).Trim()
|
||||
$shortHead = (& git rev-parse --short HEAD).Trim()
|
||||
$backendBuild = if (Test-Path "backend/package.json") { "PROJECT_PRESENT_BUILD_NOT_RUN" } else { "SKIPPED_NO_PROJECT" }
|
||||
$adminBuild = if (Test-Path "admin/package.json") { "PROJECT_PRESENT_BUILD_NOT_RUN" } else { "SKIPPED_NO_PROJECT" }
|
||||
$migrationFiles = @(Get-ChildItem -Path "database/migrations" -Filter "*.sql" -File -ErrorAction SilentlyContinue)
|
||||
$databaseMigration = if ($migrationFiles.Count -gt 0) { "PROJECT_PRESENT_MIGRATION_NOT_RUN" } else { "SKIPPED_NO_MIGRATIONS" }
|
||||
|
||||
$rawText = @"
|
||||
{
|
||||
@@ -14,7 +16,7 @@ $rawText = @"
|
||||
"backendBuild": "$backendBuild",
|
||||
"adminBuild": "$adminBuild",
|
||||
"miniappMirror": "RECORDED_SOURCE_COMMIT_ONLY",
|
||||
"databaseMigration": "SKIPPED_NO_MIGRATIONS",
|
||||
"databaseMigration": "$databaseMigration",
|
||||
"deployed": false
|
||||
}
|
||||
"@
|
||||
@@ -55,8 +57,8 @@ if ((-not (Test-Path "admin/package.json")) -and $manifest.adminBuild -ne "SKIPP
|
||||
throw "Dry-run manifest should record missing admin project"
|
||||
}
|
||||
|
||||
if ($manifest.databaseMigration -ne "SKIPPED_NO_MIGRATIONS") {
|
||||
throw "Dry-run manifest should record skipped migrations until migrations exist"
|
||||
if ($manifest.databaseMigration -ne $databaseMigration) {
|
||||
throw "Dry-run manifest databaseMigration mismatch: $($manifest.databaseMigration)"
|
||||
}
|
||||
|
||||
Write-Host "PASS: release manifest dry-run is valid for current HEAD."
|
||||
|
||||
Reference in New Issue
Block a user