We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 510c53b commit 410bfc6Copy full SHA for 410bfc6
update_major_version.sh
@@ -0,0 +1,16 @@
1
+#!/bin/bash
2
+
3
+# Get the current project version using Maven
4
+current_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
5
+echo "Current version: $current_version"
6
7
+# Extract the major version and increment it
8
+major=${current_version%%.*}
9
+new_major=$((major + 1))
10
11
+# Construct the new version string
12
+new_version="${new_major}.0.0"
13
+echo "New version: $new_version"
14
15
+# Set the new version using Maven
16
+mvn versions:set -DnewVersion=$new_version
0 commit comments