Skip to content

Commit

Permalink
[apache#5976] Improvement(bin): Update the error message for startup …
Browse files Browse the repository at this point in the history
…failures /Adjust the version check /Revert the root build.gradle.kts files
  • Loading branch information
liuchunhao committed Dec 25, 2024
1 parent 6b38ae9 commit fe87ce5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@
# Referred from Apache Submarine's common.sh implementation
# bin/common.sh

GRAVITINO_VERSION=GRAVITINO_VERSION_PLACEHOLDER
if [[ "$GRAVITINO_VERSION" == *_VERSION_PLACEHOLDER ]]; then
echo "GRAVITINO_VERSION is not set. Please make sure you are running the script from the distribution/package/bin and before running the script, run './gradle clean build -x test compileDistribution'"
exit 1
fi


if [ -L "${BASH_SOURCE-$0}" ]; then
FWDIR=$(dirname "$(readlink "${BASH_SOURCE-$0}")")
else
Expand All @@ -49,6 +42,11 @@ if [[ -f "${GRAVITINO_CONF_DIR}/gravitino-env.sh" ]]; then
. "${GRAVITINO_CONF_DIR}/gravitino-env.sh"
fi

if [[ -z "${GRAVITINO_VERSION}" ]]; then
echo -e "No GRAVITINO_VERSION was found, you may need to:\n1. Run the gravitino.sh script on the compiled Gravitino.\n2. Run the gravitino.sh script in the release package."
exit 1
fi

GRAVITINO_CLASSPATH+=":${GRAVITINO_CONF_DIR}"

JVM_VERSION=8
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ tasks {
fileName.replace(".template", "")
}
eachFile {
if (name == "gravitino-env.sh" || name == "common.sh") {
if (name == "gravitino-env.sh") {
filter { line ->
line.replace("GRAVITINO_VERSION_PLACEHOLDER", "$version")
}
Expand Down Expand Up @@ -643,7 +643,7 @@ tasks {
fileName.replace(".template", "")
}
eachFile {
if (name == "gravitino-env.sh" || name == "common.sh") {
if (name == "gravitino-env.sh") {
filter { line ->
line.replace("GRAVITINO_VERSION_PLACEHOLDER", "$version")
}
Expand Down

0 comments on commit fe87ce5

Please sign in to comment.