Skip to content
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

Feature: homewbrew formula #799

Closed
1 task done
pshirshov opened this issue Sep 19, 2020 · 18 comments
Closed
1 task done

Feature: homewbrew formula #799

pshirshov opened this issue Sep 19, 2020 · 18 comments

Comments

@pshirshov
Copy link

Hi!

It would be very nice to have a homebrew formula, current way with shell script installation is very inconvenient for automatic provisioning.

@helpermethod
Copy link
Member

helpermethod commented Sep 19, 2020

Hi @pshirshov!

Using brew for installing SDKMAN! sounds like a good idea in theory but seems to pose a few problems in practice:

  • brew discourages tools that update itself (like SDKMAN! does)
  • brew by design never modifies files outside HOMEBREW_PREFIX, so you would have to manually modify your .bash_profile to source SDKMAN's init script

The main problem I see is that people will do a brew install sdkman but (somehow understandably) skip the second step.

asdf, another popular version manager, describes the problem here.

@pshirshov
Copy link
Author

brew discourages tools that update itself (like SDKMAN! does)

Though many packages do that.

brew by design never modifies files outside HOMEBREW_PREFIX, so you would have to manually modify your .bash_profile to source SDKMAN's init script

It's possible to add a post-install message to a homebrew package. E.g. try to install JDK on Catalina - and brew will tell you what steps you must take in order to get it working.

@asmaier
Copy link

asmaier commented Sep 21, 2020

@marc0der
Copy link
Member

marc0der commented Sep 21, 2020

The main problem here is what @helpermethod stated above. SDKMAN updates itself, we would first have to do some development to disable this behaviour for brew installations. Also, sdkman has all it's files in the home folder, so it will probably be a problem for brew to manage these.

@asmaier
Copy link

asmaier commented Sep 21, 2020

But I can install for example the Google Chrome browser as cask. It also updates itself and does all kinds of things. I don't think the self-update feature is a blocker for implementing sdkman for brew cask.

@felipecrs
Copy link
Contributor

References Homebrew/brew#10167.

@jayvdb
Copy link

jayvdb commented May 25, 2021

Perhaps someone can create a custom tap for this in their own repo? It doesnt need to be perfect to be useful.

@benkeil
Copy link

benkeil commented Jan 7, 2022

Any news on this?

@helpermethod
Copy link
Member

I guess now that SDKMAN! is distributed as an SDK itself, that should be doable. Wdyt @marc0der?

@marc0der
Copy link
Member

marc0der commented Jan 8, 2022

Sure. SDKMAN still updates itself once installed, so we probably need a config to turn that off. Also, during installation, we do a bunch of stuff like populating the /var folder and other initialisation tasks.

@benkeil
Copy link

benkeil commented Jan 8, 2022

You can write a cask.

@marc0der
Copy link
Member

marc0der commented Jan 8, 2022

@benkeil Nope, not me. But maybe you can write that cask 😄

@helpermethod
Copy link
Member

helpermethod commented Jan 20, 2022

@benkeil Work on an initial Homebrew tap has started but requires some minor changes in sdkman-cli itself.

@ironfish
Copy link

ironfish commented Feb 9, 2022

What happened to this tap. I used it to install SDKMAN and now it's gone?

@helpermethod
Copy link
Member

Hi @iron,

we are currently moving the tap over to the official repository, and in the process I've made the repository private. I'll make it public until the migration is finished.

Sorry for the inconvenience!

@ironfish
Copy link

ironfish commented Feb 9, 2022

Thank you, very much appreciated.

@helpermethod
Copy link
Member

There is now an official Homebrew Tap for SDKMAN! updated automatically with every release.

Installation instructions can be found here:

https://github.com/sdkman/homebrew-tap

@marc0der
Copy link
Member

marc0der commented Apr 9, 2022

@helpermethod Thanks for all your effort. Fantastic work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants