diff --git a/scripts/build-terminal-release.ps1 b/scripts/build-terminal-release.ps1 index 033af42..270ba02 100644 --- a/scripts/build-terminal-release.ps1 +++ b/scripts/build-terminal-release.ps1 @@ -13,7 +13,11 @@ $outputDirectory = Join-Path $repositoryRoot 'artifacts' if ([string]::IsNullOrWhiteSpace($Version)) { [xml]$project = Get-Content -LiteralPath $projectPath -Raw - $Version = [string]$project.Project.PropertyGroup.Version + $versionNode = $project.SelectSingleNode('/Project/PropertyGroup/Version') + if ($null -eq $versionNode) { + throw "The terminal project does not define a Version property." + } + $Version = $versionNode.InnerText.Trim() } if ($Version -notmatch '^\d+\.\d+\.\d+$') { throw "Version must use MAJOR.MINOR.PATCH format."