Skip to content

Commit fefafb2

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 391510e commit fefafb2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.azure-pipelines/ci-build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,10 @@ extends:
118118
condition: not(contains(variables['build.sourceBranch'], 'refs/tags/v'))
119119

120120
- pwsh: |
121-
$pomXml = [xml](Get-Content pom.xml)
122-
$version = $pomXml.project.version
121+
$pomXml = [xml](Get-Content pom.xml -Raw)
122+
$ns = New-Object System.Xml.XmlNamespaceManager($pomXml.NameTable)
123+
$ns.AddNamespace('m', $pomXml.DocumentElement.NamespaceURI)
124+
$version = $pomXml.SelectSingleNode('/m:project/m:version', $ns).InnerText
123125
$snapshot_suffix = if ($Env:BRANCH_NAME.StartsWith('refs/tags/v')) { '' } else { '-SNAPSHOT' }
124126
# If version already contains -SNAPSHOT and we're on a tag, strip it
125127
if ($Env:BRANCH_NAME.StartsWith('refs/tags/v')) {

0 commit comments

Comments
 (0)