-
Notifications
You must be signed in to change notification settings - Fork 35
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
Check for newer release on GitHub #392
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am generally wary of using external dependencies, so I'd try to avoid it if possible. We can rely on the fact that ABS' latest version is published here: we could then do a GET to that URL, compare the string we receive to the current version and prompt for an update there. Would you be able to make these changes?
Done. |
Added a command-line flag (--check-update) for scripted use, and prompts in the welcome message in the REPL. Uses https://github.com/tcnksm/go-latest to do the heavy lifting. Closes abs-lang#334.
Yes, sorry for not clarifying. I think the freq check should just be there
when you start the repl.
Btw a phase 2 of this feature could be to auto-update the binary when you
run "abs upgrade" or similar. If you wanna do something in that direction
I'd be more than happy to let you experiment :)
…On Wed, Aug 5, 2020, 12:46 PM Adrian Ho ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In repl/repl.go
<#392 (comment)>:
> @@ -228,6 +228,9 @@ func BeginRepl(args []string, version string) {
panic(err)
}
fmt.Printf("Hello %s, welcome to the ABS (%s) programming language!\n", user.Username, version)
+ if newver, update := util.UpdateAvailable(version); update {
Yeah, I can do a 10%-frequency check, but since there's also a
--check-update command-line flag (which should always do the check), I'll
do the frequency check in repl.BeginRepl instead.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#392 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQFZEML6K4X63I4MCHGNDR7EL57ANCNFSM4PQF7VVA>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I should be able to merge in the 2.3.x branch in the next 48h. I will also do a release with your other minor fix for comments if we get that sorted on time.
Added a command-line flag (--check-update) for scripted use,
and prompts in the welcome message for the REPL.
Uses https://github.com/tcnksm/go-latest to do the heavy lifting.
Closes #334.