Skip to content

Commit 6481911

Browse files
Merge pull request #8 from reactome/version-file
add update version file
2 parents d729779 + 65e18e6 commit 6481911

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

update_minor_version.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)