Define EveUnity release contract
This commit is contained in:
parent
06fea925ff
commit
5b60023832
10 changed files with 170 additions and 2 deletions
|
|
@ -87,6 +87,37 @@ foreach ($stage in @("release", "test", "capture")) {
|
|||
}
|
||||
}
|
||||
|
||||
$releaseContract = $manifest.lifecycle.release.releaseContract
|
||||
if ($null -eq $releaseContract) {
|
||||
throw "EveUnity release lifecycle missing releaseContract"
|
||||
}
|
||||
if ($releaseContract.ownerRepo -ne "EveUnity") {
|
||||
throw "EveUnity release contract has unexpected owner: $($releaseContract.ownerRepo)"
|
||||
}
|
||||
if ($releaseContract.packageName -ne "org.gamecult.eve.unity-uitoolkit") {
|
||||
throw "EveUnity release contract has unexpected package name: $($releaseContract.packageName)"
|
||||
}
|
||||
if ($releaseContract.artifactKind -ne "upm-package") {
|
||||
throw "EveUnity release contract has unexpected artifact kind: $($releaseContract.artifactKind)"
|
||||
}
|
||||
if (-not ($releaseContract.tagPattern -match "\{version\}")) {
|
||||
throw "EveUnity release contract tag pattern must include {version}: $($releaseContract.tagPattern)"
|
||||
}
|
||||
foreach ($pathProperty in @("packageRoot", "versionSource")) {
|
||||
$relativePath = $releaseContract.$pathProperty
|
||||
if (-not $relativePath) {
|
||||
throw "EveUnity release contract missing $pathProperty"
|
||||
}
|
||||
$absolutePath = Join-Path $projectRoot $relativePath
|
||||
if (-not (Test-Path -LiteralPath $absolutePath)) {
|
||||
throw "EveUnity release contract $pathProperty does not exist: $relativePath"
|
||||
}
|
||||
}
|
||||
$packageManifest = Get-Content -LiteralPath (Join-Path $projectRoot $releaseContract.versionSource) -Raw | ConvertFrom-Json
|
||||
if ($packageManifest.name -ne $releaseContract.packageName) {
|
||||
throw "EveUnity release contract package name does not match package manifest: $($releaseContract.packageName) vs $($packageManifest.name)"
|
||||
}
|
||||
|
||||
& (Join-Path $projectRoot "scripts\run-aetheria-unity-package-smoke.ps1")
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Aetheria Unity package smoke failed with exit code $LASTEXITCODE"
|
||||
|
|
|
|||
|
|
@ -63,7 +63,11 @@ node $consumerScript $consumerExport `
|
|||
--expect-runtime-lifecycle-status unity-uitoolkit:capture:pending-editor-capture `
|
||||
--expect-runtime-lifecycle-pending "unity-uitoolkit:release:Tagged UPM release" `
|
||||
--expect-runtime-lifecycle-pending "unity-uitoolkit:test:Unity batchmode EditMode runner" `
|
||||
--expect-runtime-lifecycle-pending "unity-uitoolkit:capture:Unity batchmode or editor capture artifact"
|
||||
--expect-runtime-lifecycle-pending "unity-uitoolkit:capture:Unity batchmode or editor capture artifact" `
|
||||
--expect-runtime-lifecycle-field "unity-uitoolkit:release:releaseContract.packageName:org.gamecult.eve.unity-uitoolkit" `
|
||||
--expect-runtime-lifecycle-field "unity-uitoolkit:release:releaseContract.artifactKind:upm-package" `
|
||||
--expect-runtime-lifecycle-field "unity-uitoolkit:release:releaseContract.tagPattern:eveunity-uitoolkit-v{version}" `
|
||||
--expect-runtime-lifecycle-field "unity-uitoolkit:release:releaseContract.packageRoot:packages/org.gamecult.eve.unity-uitoolkit"
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Runtime owner conformance consumer smoke failed with exit code $LASTEXITCODE"
|
||||
|
|
|
|||
Loading…
Reference in a new issue