Skip to content

Commit 146fd03

Browse files
committed
ci: makes the version matching script more tolerant to different spacing
1 parent dceea8f commit 146fd03

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.azure-pipelines/ci-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ extends:
9090

9191
- pwsh: |
9292
$contents = Get-Content gradle.properties -Raw
93-
$major = $contents | Select-String -Pattern 'mavenMajorVersion = ([0-9]+)' | ForEach-Object { $_.Matches.Groups[1].Value }
94-
$minor = $contents | Select-String -Pattern 'mavenMinorVersion = ([0-9]+)' | ForEach-Object { $_.Matches.Groups[1].Value }
95-
$patch = $contents | Select-String -Pattern 'mavenPatchVersion = ([0-9]+)' | ForEach-Object { $_.Matches.Groups[1].Value }
93+
$major = $contents | Select-String -Pattern 'mavenMajorVersion\s*=\s*([0-9]+)' | ForEach-Object { $_.Matches.Groups[1].Value }
94+
$minor = $contents | Select-String -Pattern 'mavenMinorVersion\s*=\s*([0-9]+)' | ForEach-Object { $_.Matches.Groups[1].Value }
95+
$patch = $contents | Select-String -Pattern 'mavenPatchVersion\s*=\s*([0-9]+)' | ForEach-Object { $_.Matches.Groups[1].Value }
9696
# $snapshot_suffix = if ($Env:BRANCH_NAME.StartsWith('refs/tags/v')) { '' } else { '-SNAPSHOT' }
9797
$version = "$major.$minor.$patch$snapshot_suffix"
9898
echo "Current version is $version"

0 commit comments

Comments
 (0)