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

Support a config that can install all my tool plugins and multiple versions per tool #1298

Closed
nitrocode opened this issue Jul 16, 2022 · 1 comment

Comments

@nitrocode
Copy link

nitrocode commented Jul 16, 2022

Is your feature request related to a problem? Please describe

I switch laptops frequently and when I'm on a new laptop, I need to install versions of my favorite tools. My current script is something like this.

asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs latest
asdf install nodejs 15
asdf install nodejs 14
asdf install nodejs 13
asdf global nodejs latest

Describe the proposed solution

https://gist.github.com/ChristopherA/a579274536aab36ea9966f301ff14f3f
https://docs.brew.sh/Manpage

A configuration file similar to homebrew's Brewfile where

  • Run brew bundle dump > Brewfile to dump the full list of installed items from Brew
  • Copy the file to another machine
  • Run brew bundle install and it will install all my formula

I think the same workflow can be used in asdf (unless this already exists?).

e.g.

asdf bundle dump > Asdffile

# Asdffile
plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs latest 15 14 13
asdf global nodejs latest

Then asdf bundle install --file Asdffile or just asdf bundle install (implicit Asdffile)

Describe similar asdf features and why they are not sufficient

Create a script that runs asdf plugin add for each tool and then asdf <tool> install <version> for each tool and version. It works but I can forget to update the script, forget to add a tool, or forget to add a version.

Describe other workarounds you've considered

I cannot think of another workaround

@nitrocode nitrocode changed the title Support a config that can install multiple versions per tool Support a config that can install all my tool plugins and multiple versions per tool Jul 16, 2022
@jthegedus
Copy link
Contributor

If we are ever going to implement automatic install of plugins we will utilise the existing file .tool-versions file format, if anything.

In the meantime, you can write your own Shell script make what you want easier, you've essentially written the script in your description, just put it in a file setup-nodejs and run bash setup-nodejs.

This topic has been discussed extensively in these related issues:

So I am going to close this in favour of continuing this conversation there.

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

2 participants