Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions update_minor_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Get the current version from Maven
current_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Current version: $current_version"

# Extract major, minor, and patch versions
major=${current_version%%.*}
rest=${current_version#*.}
minor=${rest%%.*}
patch=${rest#*.}

# Increment the minor version
new_minor=$((minor + 1))
new_version="${major}.${new_minor}.0"

# Output the new version
echo "New version: $new_version"

# Set the new version in Maven
mvn versions:set -DnewVersion=$new_version