File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ PACKAGE_NAME=analysis.core
4+
35# Get the current version from Maven
46current_version=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
57echo " Current version: $current_version "
68
9+
710# Extract major, minor, and patch versions
8- major=${current_version%% .* }
9- rest=${current_version#* .}
10- minor=${rest%% .* }
11- patch=${rest#* .}
11+ major=${current_version%% .* }
12+ rest=${current_version#* .}
13+ minor=${rest%% .* }
14+ patch=${rest#* .}
15+
1216
1317# Increment the minor version
1418new_minor=$(( minor + 1 ))
1519new_version=" ${major} .${new_minor} .0"
16-
1720# Output the new version
1821echo " New version: $new_version "
19-
2022# Set the new version in Maven
2123mvn versions:set -DnewVersion=$new_version
24+
25+
26+
27+ if grep -q " ^${PACKAGE_NAME} =" /var/go/versions.properties; then
28+ sed -i " s/^${PACKAGE_NAME} =.*/${PACKAGE_NAME} =${new_version} /" /var/go/versions.properties
29+ else
30+ echo " ${PACKAGE_NAME} =${new_version} " >> /var/go/versions.properties
31+ fi
You can’t perform that action at this time.
0 commit comments