liuchunhao opened a new pull request, #5977: URL: https://github.com/apache/gravitino/pull/5977
<!-- 1. Title: [#<issue>] <type>(<scope>): <subject> Examples: - "[#123] feat(operator): support xxx" - "[#233] fix: check null before access result in xxx" - "[MINOR] refactor: fix typo in variable name" - "[MINOR] docs: fix typo in README" - "[#255] test: fix flaky test NameOfTheTest" Reference: https://www.conventionalcommits.org/en/v1.0.0/ 2. If the PR is unfinished, please mark this PR as draft. --> ### What changes were proposed in this pull request? - Add file suffix ‘template’ to the following scripts: - bin/gravitino.sh - bin/common.sh - bin/gravitino-iceberg-rest-server.sh - Add a validation check on `GRAVITINO_VERSION` in the script bin/common.sh ( renamed to bin/common.sh.template ) with the followings : ```bash 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 ``` - Update the following tasks in the root build.gradle.kts as described below : - compileDistribution - compileIcebergRESTServer ```bash eachFile { if (name == "gravitino-env.sh" || name == "common.sh") { filter { line -> line.replace("GRAVITINO_VERSION_PLACEHOLDER", "$version") } } } ``` ### Why are the changes needed? To prevent incorrect usage with startup scripts ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - The scripts below will exit with status 1 and print an error message with the correct instructions ```bash cd bin gravitino.sh.template start gravitino-iceberg-rest-server.sh.template start ``` - correct way to run gravitino : ```bash ./gradle clean build -x test compileDistribution cd distribution/package/bin ./gravitino.sh start ./gravitino-iceberg-rest-server.sh start ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org