Skip to content

Commit 3c227a0

Browse files
ArchILLtectCopilot
andauthored
refactor(version): validate input version for PS script
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 6ac7a1a commit 3c227a0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/release-bump.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
param(
22
[Parameter(Mandatory=$true)][string]$NewVersion
33
)
4+
if ($NewVersion -notmatch '^\d+\.\d+\.\d+$') {
5+
Write-Error "Invalid version format. Expected: X.Y.Z"
6+
exit 1
7+
}
48
# Update pom.xml version using Maven's built-in versioning
59
& mvn versions:set -DnewVersion=$NewVersion -DgenerateBackupPoms=false
610
# Update CHANGELOG compare link

0 commit comments

Comments
 (0)