Skip to content

Commit 758fffb

Browse files
authored
Update update_major_version.sh
1 parent 1092202 commit 758fffb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

update_major_version.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/bin/bash
22

3-
PACKAGE_NAME=graph.core
3+
PACKAGE_NAME=GRAPH_CORE_VERSION
4+
5+
# Check if VERSIONS_FILE_PATH is not set or empty
6+
if [ -z "${VERSIONS_FILE_PATH}" ]; then
7+
echo "Error: Please define \${VERSIONS_FILE_PATH} in the GO-CD environment or in the server."
8+
exit 1
9+
fi
410

511
# Get the current project version using Maven
612
current_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
@@ -21,4 +27,4 @@ if grep -q "^${PACKAGE_NAME}=" /var/go/versions.properties; then
2127
sed -i "s/^${PACKAGE_NAME}=.*/${PACKAGE_NAME}=${new_version}/" /var/go/versions.properties
2228
else
2329
echo "${PACKAGE_NAME}=${new_version}" >> /var/go/versions.properties
24-
fi
30+
fi

0 commit comments

Comments
 (0)