-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Update capability to replace arkade with a newer version #973
Comments
@Jasstkn / @mrwormhole do you have time for a challenge? |
yes makes sense to me, is it potentially safe to swap old arkade binary with new arkade binary during the old arkade CLI process? I believe it is safe on linux, but on windows I have doubts currently this makes sense;
|
Perhaps we'll start with Linux first then? |
Hm, on Mac I just have an alias to do the following:
|
The first sudo shouldn't be needed for |
yep, you're right! |
How about we get the current binary first with Honestly I don't know if this will work on windows, but I'm quite sure it this will solve the problem for our unix friends. |
I have a windows to test on now 😃 |
@alexellis, @Jasstkn is this solution seems good for you guys? I can start to skeetch up a PR this weekend or so. |
It would be possible to self-update by running
arkade update
and having the running binary replaced by a newer version.arkade get arkade
has the logic to download the latest version, but we need something to replace this version.I'd also like to see the self-check only download the binary if there's a newer version, something which we can find a way to optimise.
This way, people could add
arkade update
to their .bashrc, profile, or a daily cron.Expected Behaviour
Update command can replace the running version
Current Behaviour
It prints out install instructions, which can be copy/pasted
Possible Solution
arkade get arkade
to get an updated versionI want to avoid using any self-updating libraries or external dependencies. We did this for another project using stdlib.
Context
I've been seeing a lot more breakages recently with projects changing binary names and formats, this would make arkade self-update, and work better for when we've fixed issues introduced by upstream projects.
The text was updated successfully, but these errors were encountered: