Skip to content

Commit 7ded3d2

Browse files
authoredJan 31, 2022
Merge pull request #132 from dataplat/development
Fix release branch version logic
2 parents 4a66dd7 + f90d537 commit 7ded3d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎build/bump_version.ps1

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Write-Host "Current build $version"
1212
[version]$publishedVersion = Find-Module dbops -ErrorAction Stop | Select-Object -ExpandProperty Version
1313
if ($version -le $publishedVersion) {
1414
# increase version and push back to git
15-
[string]$newVersion = [Version]::new($publishedVersion.Major, $publishedVersion.Minor, ($publishedVersion.Build + 1))
15+
$version = [Version]::new($publishedVersion.Major, $publishedVersion.Minor, ($publishedVersion.Build + 1))
1616
$content = Get-Content $Path
17-
$content | Foreach-Object { $_ -replace $regEx, "`$1'$newVersion'" } | Out-File $Path -Force -Encoding utf8
17+
$content | Foreach-Object { $_ -replace $regEx, "`$1'$version'" } | Out-File $Path -Force -Encoding utf8
1818
$newModuleFile = Invoke-Command -ScriptBlock ([scriptblock]::Create((Get-Content $Path -Raw)))
1919
Write-Host "New build $($newModuleFile.ModuleVersion)"
20-
git add $moduleFile
20+
git add $Path
2121
git commit -m "v$version"
2222
}
2323
git push origin HEAD:development
24-
git branch release/$version
24+
git branch "release/$version"
2525
git push --all origin

0 commit comments

Comments
 (0)
Please sign in to comment.