-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Update sqlcl links #249134
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
base: main
Are you sure you want to change the base?
Update sqlcl links #249134
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,12 +12,26 @@ | |||||||||||||||||||||||||||||||||
| regex(/href=.*?sqlcl[._-]v?(\d+(?:\.\d+)+)\.zip/i) | ||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| depends_on formula: "openjdk@11" | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| stage_only true | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| zap trash: "~/.sqlcl" | ||||||||||||||||||||||||||||||||||
| postflight do | ||||||||||||||||||||||||||||||||||
| cask_dir = Pathname("#{HOMEBREW_PREFIX}/Caskroom/sqlcl") | ||||||||||||||||||||||||||||||||||
| version_dir = cask_dir/version | ||||||||||||||||||||||||||||||||||
| latest_dir = cask_dir/"latest" | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| caveats do | ||||||||||||||||||||||||||||||||||
| depends_on_java "11+" | ||||||||||||||||||||||||||||||||||
| path_environment_variable "#{staged_path}/sqlcl/bin" | ||||||||||||||||||||||||||||||||||
| latest_dir.delete if latest_dir.symlink? | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| latest_dir.make_symlink(version_dir) | ||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||
|
Comment on lines
15
to
25
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This should allow us to avoid the entire
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would be good but unfortunately, thats not how we ship the code everywhere else. It’s known everywhere as a sql prompt. I’m open to other suggestions. Ultimately, even this way, we;d be adding a soft link to link it to sql or telling customers to add a link to link sqlcl to sql in their environment
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe when it is shipped directly from the developer, but the current cask file results in a bad user experience because it is not compatible with Homebrew API. We really shouldn't be shipping custom logic like this in Regarding how the code is shipped "everywhere else". It's shipped as All this to say that installing |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| zap trash: "~/.sqlcl" | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| caveats <<~EOS | ||||||||||||||||||||||||||||||||||
| sqlcl requires Java 11 or later. | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| To use sqlcl, add the following to your shell PATH: | ||||||||||||||||||||||||||||||||||
| export PATH="#{HOMEBREW_PREFIX}/Caskroom/sqlcl/latest/sqlcl/bin:$PATH" | ||||||||||||||||||||||||||||||||||
| EOS | ||||||||||||||||||||||||||||||||||
bamcgill marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.