fix: read terminal release version reliably
Some checks failed
ci / verify (push) Has been cancelled

This commit is contained in:
Ochenstarik 2026-09-24 17:13:14 +07:00
parent df0da37d5c
commit 0f530dc633

View file

@ -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."