taylor / kiex

Elixir version manager
http://taylor.github.io/kiex/
MIT License
766 stars 65 forks source link

Parameterize Elixir installations using OTP release #97

Closed vkz closed 2 weeks ago

vkz commented 3 weeks ago

Elixir builds and therefore installations are specific to the Erlang/OTP release used. E.g. building the same Elixir 1.16.3 version on the 25 release of Erlang/OTP will not work on 26 release.

This small addition ensures the build is parameterized by both the Elixir version requested and the Erlang/OTP release used to build it.

For example you may have global Erlang/OTP 26 while project specific may be version 25. Installing Elixir globally or inside the project will then result in two Elixirs installed:

$ kiex list

kiex elixirs

   elixir-1.16.3-25
=> elixir-1.16.3-26

Then in your project you may: source "$HOME/.kiex/elixirs/elixir-1.16.3-25.env"

While globally in your $HOME/.bashrc: source "$HOME/.kiex/elixirs/elixir-1.16.3-26.env"

This change only touches install_elixir function and leaves surrounding code unchanged and unchecked. Someone who knows the kiex source code should check if the right suffix (elixir version + otp release) is used where necessary.

vkz commented 3 weeks ago

While we wait on this PR to be merged ...

For anyone who wants a single command install feel free to use this branch in my fork, where I replaced relevant Git refs to do the right thing. But once merged, please use original kiex.

Install

\curl -sSL https://raw.githubusercontent.com/vkz/kiex/vkz_install/install | bash -s

NB Always check what the hell script you're running! I am not giving you any guarantees! Please do your own due-dilligence! By running the above you understand the security risks and I take no responsibility. Thank you

taylor commented 2 weeks ago

Thanks for the contribution @vkz