Skip to content

Commit c6a82e6

Browse files
ArchILLtectCopilot
andauthored
refactor(version): validate existence of version for PS script
The PowerShell script should validate that the tag doesn't already exist before attempting to create it. Add: if (git rev-parse \"v$NewVersion\" 2>$null) { Write-Error \"Tag v$NewVersion already exists\"; exit 1 } before line 12. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 3c227a0 commit c6a82e6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/release-bump.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ if (Select-String -Path CHANGELOG.md -Pattern '\[Unreleased\]:') {
1313
}
1414
& git add pom.xml CHANGELOG.md
1515
& git commit -m "chore(release): v$NewVersion"
16+
if (git rev-parse "v$NewVersion" 2>$null) { Write-Error "Tag v$NewVersion already exists"; exit 1 }
1617
& git tag -a "v$NewVersion" -m "Release v$NewVersion"
1718
Write-Output "Version bumped to $NewVersion. Next: push branch + tag."
1819

0 commit comments

Comments
 (0)