Normalize Geometry release package versions

This commit is contained in:
Meta Vens 2026-07-22 04:37:09 +01:00
commit 0a3aebd12e
12 changed files with 35 additions and 14 deletions

View file

@ -1,5 +1,7 @@
param(
[string] $Version = "0.1.0-geometry-migration.2",
[string] $GeometryVersion = "0.1.0",
[string] $SupportVersion = "1.0.3",
[string] $CultMathVersion = "0.1.0",
[string] $OutputDirectory = "artifacts\candidate-feed",
[string] $CultMathCandidateFeed = "..\CultMath\.tools\local-feed"
)
@ -9,6 +11,10 @@ $project = Join-Path $root "src\GameCult.Geometry\GameCult.Geometry.csproj"
$output = Join-Path $root $OutputDirectory
$feed = [IO.Path]::GetFullPath((Join-Path $root $CultMathCandidateFeed))
New-Item -ItemType Directory -Force -Path $output | Out-Null
$cultMathPackage = Join-Path $feed "CultMath.$CultMathVersion.nupkg"
if (-not (Test-Path -LiteralPath $cultMathPackage)) {
throw "CultMath $CultMathVersion is missing from $feed. Pack the final CultMath artifact first."
}
$supportProjects = @(
"src\GameCult.Logging\GameCult.Logging.csproj",
"src\GameCult.Caching\GameCult.Caching.csproj",
@ -19,13 +25,13 @@ $supportProjects = @(
)
foreach ($relativeProject in $supportProjects) {
$supportProject = Join-Path $root $relativeProject
dotnet pack $supportProject -c Release -o $output --disable-build-servers -p:PackageVersion=$Version -p:UseSharedCompilation=false -m:1
dotnet pack $supportProject -c Release -o $output --disable-build-servers -p:PackageVersion=$SupportVersion -p:UseSharedCompilation=false -m:1
if ($LASTEXITCODE -ne 0) { throw "Candidate support pack failed: $relativeProject" }
}
dotnet restore $project --disable-build-servers -p:CultMathCandidateFeed=$feed -p:UseSharedCompilation=false -m:1
dotnet restore $project --disable-build-servers -p:CultMathCandidateFeed=$feed -p:CultMathVersion=$CultMathVersion -p:UseSharedCompilation=false -m:1
if ($LASTEXITCODE -ne 0) { throw "Geometry candidate restore failed." }
dotnet pack $project -c Release -o $output --no-restore --disable-build-servers -p:PackageVersion=$Version -p:CultMathCandidateFeed=$feed -p:UseSharedCompilation=false -m:1
dotnet pack $project -c Release -o $output --no-restore --disable-build-servers -p:CultMathVersion=$CultMathVersion -p:CultMathCandidateFeed=$feed -p:UseSharedCompilation=false -m:1
if ($LASTEXITCODE -ne 0) { throw "Geometry candidate pack failed." }
$package = Join-Path $output "GameCult.Geometry.$Version.nupkg"
$package = Join-Path $output "GameCult.Geometry.$GeometryVersion.nupkg"
if (-not (Test-Path -LiteralPath $package)) { throw "Geometry candidate package was not produced." }
Write-Host $package