Skip to content

Commit

Permalink
bumped
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed Dec 6, 2024
1 parent 067d249 commit 3c92125
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions bump.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ $version = $null

try
{
$version = $( git describe --tags --abbrev=0 )
$version = $( git describe --tags --abbrev=0 ) -replace "v"
if ($version -notmatch $versionPattern)
{
Write-Error "Invalid version format. Expected: x.y.z"
Write-Error "Invalid version format $version. Expected: x.y.z"
exit 1
}

Expand All @@ -30,8 +30,8 @@ try
Write-Host "New version: $newVersion"
Write-Host "Creating new tag..."

git tag -a $newVersion -m "$message"
git push origin $newVersion
git tag -a v$newVersion -m "$message"
git push origin v$newVersion
}
catch
{
Expand Down
5 changes: 3 additions & 2 deletions bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ version=''

# Get the current version
version=$(git describe --tags --abbrev=0 2>/dev/null)
version=${version//v}
if [[ ! $version =~ $versionPattern ]]; then
echo "Invalid version format. Expected: x.y.z"
exit 1
Expand All @@ -30,5 +31,5 @@ echo "New version: $newVersion"
echo "Creating new tag..."

# Create a new tag and push it
git tag -a "$newVersion" -m "$message"
git push origin "$newVersion"
git tag -a "v$newVersion" -m "$message"
git push origin "v$newVersion"

0 comments on commit 3c92125

Please sign in to comment.