We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9bcbc9 commit 20760f1Copy full SHA for 20760f1
update_minor_version.sh
@@ -0,0 +1,21 @@
1
+#!/bin/bash
2
+
3
+# Get the current version from Maven
4
+current_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
5
+echo "Current version: $current_version"
6
7
+# Extract major, minor, and patch versions
8
+major=${current_version%%.*}
9
+rest=${current_version#*.}
10
+minor=${rest%%.*}
11
+patch=${rest#*.}
12
13
+# Increment the minor version
14
+new_minor=$((minor + 1))
15
+new_version="${major}.${new_minor}.0"
16
17
+# Output the new version
18
+echo "New version: $new_version"
19
20
+# Set the new version in Maven
21
+mvn versions:set -DnewVersion=$new_version
0 commit comments