feat(M01-A): 建立后端API基础骨架
This commit is contained in:
@@ -2,14 +2,17 @@ $ErrorActionPreference = "Stop"
|
||||
|
||||
$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" }
|
||||
|
||||
$rawText = @"
|
||||
{
|
||||
"releaseId": "DRYRUN-$shortHead",
|
||||
"generatedAt": "WINDOWS_CHECK",
|
||||
"commit": "$head",
|
||||
"branch": "main",
|
||||
"backendBuild": "SKIPPED_NO_PROJECT",
|
||||
"adminBuild": "SKIPPED_NO_PROJECT",
|
||||
"backendBuild": "$backendBuild",
|
||||
"adminBuild": "$adminBuild",
|
||||
"miniappMirror": "RECORDED_SOURCE_COMMIT_ONLY",
|
||||
"databaseMigration": "SKIPPED_NO_MIGRATIONS",
|
||||
"deployed": false
|
||||
@@ -39,8 +42,17 @@ if ($manifest.deployed -ne $false) {
|
||||
throw "Dry-run manifest must not mark deployed=true"
|
||||
}
|
||||
|
||||
if ($manifest.backendBuild -ne "SKIPPED_NO_PROJECT" -or $manifest.adminBuild -ne "SKIPPED_NO_PROJECT") {
|
||||
throw "Dry-run manifest should record skipped builds until projects exist"
|
||||
if ((Test-Path "backend/package.json") -and $manifest.backendBuild -ne "PROJECT_PRESENT_BUILD_NOT_RUN") {
|
||||
throw "Dry-run manifest should record backend project presence"
|
||||
}
|
||||
if ((-not (Test-Path "backend/package.json")) -and $manifest.backendBuild -ne "SKIPPED_NO_PROJECT") {
|
||||
throw "Dry-run manifest should record missing backend project"
|
||||
}
|
||||
if ((Test-Path "admin/package.json") -and $manifest.adminBuild -ne "PROJECT_PRESENT_BUILD_NOT_RUN") {
|
||||
throw "Dry-run manifest should record admin project presence"
|
||||
}
|
||||
if ((-not (Test-Path "admin/package.json")) -and $manifest.adminBuild -ne "SKIPPED_NO_PROJECT") {
|
||||
throw "Dry-run manifest should record missing admin project"
|
||||
}
|
||||
|
||||
if ($manifest.databaseMigration -ne "SKIPPED_NO_MIGRATIONS") {
|
||||
|
||||
Reference in New Issue
Block a user