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

Could TopGrade Please Support ZVM? #769

Closed
tristan-nsg opened this issue Apr 10, 2024 · 3 comments · Fixed by #777
Closed

Could TopGrade Please Support ZVM? #769

tristan-nsg opened this issue Apr 10, 2024 · 3 comments · Fixed by #777
Labels
C-feature request New feature request

Comments

@tristan-nsg
Copy link

I want to suggest a new step

Which tool is this about? Where is its repository?

The tool is ZVM. It's the Zig Version Manager.

Which operating systems are supported by this tool?

  • Windows
  • Linux
  • MacOS
  • FreeBSD
  • NetBSD
  • Plan9
  • Solaris

What should Topgrade do to figure out if the tool needs to be invoked?

It depends on what you're most comfortable with. ZVM comes with its own self-upgrade functionality. Just running that will automatically upgrade ZVM to the latest version, or print a nice message to stdout if the latest version is already installed.

If you'd rather grab ZVM manually, the releases are all hosted on GitHub and organized by zvm-${os}-${arch}. The bundle just needs to be unpacked in $ZVM_INSTALL or ~/.zvm/self if the former is not set. Add that directory and ~/$(ZVM_INSTALL)/../bin to path as well.

This is the equivalent bash.

echo "# ZVM" >> $HOME/.profile
echo export ZVM_INSTALL="$HOME/.zvm/self" >> $HOME/.profile
echo export PATH="$PATH:$HOME/.zvm/bin" >> $HOME/.profile
echo export PATH="$PATH:$ZVM_INSTALL/" >> $HOME/.profile

image

Which exact commands should Topgrade run?

zvm upgrade

More information

ZVM comes with one-line install scripts for Bash and Windows. The Bash Script does not edit environment variables, but that's just because I'm not comfortable with Bash enough to edit user's configs. Following the install script will show you step-by-step how to install and configure ZVM.

@tristan-nsg tristan-nsg added the C-feature request New feature request label Apr 10, 2024
@SteveLauC
Copy link
Member

So IIUC, zvm upgrade only updates zvm itself, it won't update the installed Zig toolchains

@tristan-nsg
Copy link
Author

Yes. I thought that was what the question was asking. If the goal is to upgrade Zig, then just run zvm i master.

@SteveLauC
Copy link
Member

then just run zvm i master.

Ok, I am not familiar with zig, so I will implement this step and let it update zvm itself

@SteveLauC SteveLauC linked a pull request Apr 21, 2024 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature request New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants