-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#6603] chore(*): fix CLI.sh can't find the Jar #6686
base: main
Are you sure you want to change the base?
Conversation
Changing the packaging flow, Copy the CLI-related jars to package/libs and add gcli.sh to bin.
change some docs file.
@justinmclean @tengqm could you please review this PR when you have time? I’d really appreciate your feedback. |
set -e | ||
|
||
if [ -L "${BASH_SOURCE-$0}" ]; then | ||
FWDIR=$(dirname "$(readlink "${BASH_SOURCE-$0}")") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does 'FWDIR' means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWDIR represent "Framework Directory" and is used to determine the directory path where the script is located.
@@ -52,7 +52,7 @@ Before you can build and run this project, it is suggested you have the followin | |||
3. Create an alias: | |||
|
|||
```bash | |||
alias gcli='java -jar clients/cli/build/libs/gravitino-cli-*-incubating-SNAPSHOT.jar' | |||
alias gcli='sh $GRAVITINO_HOME/bin/gcli.sh' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we solve this problem by having java
search for the right jar rather than introducing another layer of indirection?
Personally I don't like this approach, especially considering that the gcli
alias is starting a new shell.
It's not a good idea to put cli jar into the Gravitino server package. If we want to ship it with server binary, I think we should figure out a better way. |
Can we add an auxlib directory (like Hive) to package directory and copy the CLI-related Jar to it? By doing so, the Jar path can be uniquely determined by the script. |
What changes were proposed in this pull request?
fix CLI.sh can't find the Jar
package/libs
and add gcli.sh tobin
.Why are the changes needed?
Fix: #6603
Does this PR introduce any user-facing change?
yes, If user set the
GRAVITINO_HOME
environment variable, then can create a convenient alias by running aliasgcli='sh $GRAVITINO_HOME/bin/gcli.sh'
. After that, user will be able to use thegcli
tool directly from anywhere in their terminal.How was this patch tested?
local test.
