Use go-update and semver for a better upgrade experience#385
Conversation
This should resolve #381
|
This looks great! I still need to read it in detail, but I really like relying on 3rd party libraries for this behavior. ✨ |
|
Great! Let me know if you have any feedback. Also, if you know someone that can test this out on Windows that would be great, if not I can set up a VM to test it at some point. I've tested it both on Linux and Darwin and it worked fine so far. |
|
@Tonkpils I have managed to install Go onto Windows, fork this repo, and to build the cli based on branch How should or can I proceed? I have no experience with Go so please be patient. 😄 Thanks. cc: @kytrinyx |
|
Success! Congrats @Tonkpils! I found Let me know if there is anything else I can do to help. |
|
@rpottsoh awesome! Thank you. You can also download older versions (if necessary) in the list of releases: https://github.com/exercism/cli/releases (I'm not sure where the exercism.exe gets put, but uninstalling the CLI should be as simple as deleting the exe) |
|
@kytrinyx thanks for the tip about where to find old releases. It wasn't too bad to get Go up and working, the readme.md for the cli repo was sufficient. I found Interestingly I confirmed my build of the cli actually worked (prior to the upgrade) by listing available exercises from a couple different tracks. Is |
|
@rpottsoh So, if I remember correctly, what it's actually doing, to get around Windows restrictions of deleting the binary, is to create a new binary, moving the old one to a hidden file, then renaming the new binary. There's an option to patch the exe but I didn't look to deep into it as to how it worked. |
|
A little "bait and switch" to work around Windows. I like it. Thanks making this update.
Sent from my android device.
…-----Original Message-----
From: Leo Correa <notifications@github.com>
To: exercism/cli <cli@noreply.github.com>
Cc: Ryan Potts <rpottsoh@gmail.com>, Mention <mention@noreply.github.com>
Sent: Wed, 28 Jun 2017 4:55 PM
Subject: Re: [exercism/cli] Use go-update and semver for a better upgrade experience (#385)
@rpottsoh So, if I remember correctly, what it's actually doing, to get around Windows restrictions of deleting the binary, is to create a new binary, moving the old one to a hidden file, then renaming the new binary. There's an option to patch the exe but I didn't look to deep into it as to how it worked.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#385 (comment)
|
|
@Tonkpils I'll make a release today with this change. Thanks for taking the time to figure this one out! |
|
Great! I'll be on the lookout for any feedback and improve on it if necessary! Thanks for taking care of the release 🎉 |
|
I forgot to release yesterday. I'll do it today! |
|
Released! PR is open in homebrew: Homebrew/homebrew-core#15197 |
This should resolve #381
I haven't gotten a chance to test this on Windows but if the unzipping works correctly,
go-updateshould handle the upgrade correctly.I will be writing tests for this shortly. Just wanted to get something out there to iterate over.