ci: fix version extraction in package-velopack.ps1 (handle multiple PropertyGroup)
This commit is contained in:
1 file changed
+2
-2
@@ -25,9 +25,9 @@ $iconPath = Join-Path $repoRoot "src\RgbLedStripController\Assets\AppIcon.ico"
|
|||||||
$publishDir = Join-Path $repoRoot "artifacts\publish\win-x64"
|
$publishDir = Join-Path $repoRoot "artifacts\publish\win-x64"
|
||||||
$velopackDir = Join-Path $repoRoot "artifacts\velopack\win-x64-stable"
|
$velopackDir = Join-Path $repoRoot "artifacts\velopack\win-x64-stable"
|
||||||
|
|
||||||
# Sürümü csproj'dan oku
|
# Sürümü csproj'dan oku (birden fazla PropertyGroup olabilir)
|
||||||
$projXml = [xml](Get-Content $projPath)
|
$projXml = [xml](Get-Content $projPath)
|
||||||
$version = $projXml.Project.PropertyGroup.Version
|
$version = $projXml.Project.PropertyGroup | Where-Object { $_.Version } | Select-Object -First 1 -ExpandProperty Version
|
||||||
if (-not $version) { throw "Version not found in csproj" }
|
if (-not $version) { throw "Version not found in csproj" }
|
||||||
Write-Host "Version: $version" -ForegroundColor Cyan
|
Write-Host "Version: $version" -ForegroundColor Cyan
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user