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

Add self update feature with GUI #65

Closed
wants to merge 5 commits into from

Conversation

kevinchua6
Copy link
Contributor

@kevinchua6 kevinchua6 commented Aug 9, 2022

Uses the https://github.com/creativeprojects/go-selfupdate package to detect updates and automatically self-updates when the app is started, prompting a restart.

Example:
Screenshot 2022-08-09 at 5 06 17 PM

Fixes #50

@kevinchua6 kevinchua6 marked this pull request as ready for review August 9, 2022 09:08
@kevinchua6 kevinchua6 changed the title test: test auto update Add self update feature with GUI Aug 9, 2022
@Beebeeoii
Copy link
Owner

thanks for making this PR. looks good ! just some additional thoughts regarding this feature: would it be better to:

  • have this checking for update run on daily cron instead of just on startup?
  • have a check for update button somewhere (possibly in preferences) for users to check for updates immediately?
  • have a "auto update checkbox" for users to indicate if they want the app to auto update?

@kevinchua6
Copy link
Contributor Author

kevinchua6 commented Aug 9, 2022

  1. I think it's only necessary to do it on startup, because we need to restart the app anyway after updating. It's also not a very costly operation in terms of time taken haha so I don't think there's much advantage of doing it on cron
  2. I think that's a good idea! I'll implement this.
  3. Good idea! I'll do this also

@Beebeeoii
Copy link
Owner

Beebeeoii commented Aug 9, 2022

works fine on windows but something seems off when i tested this on kubuntu 22.04... looks like its something to do with permissions.

[2022-08-09 22:47:51] FATAL - Error occurred while updating binary: open /usr/local/bin/.lominus.new: permission denied (/home/jiawei/Documents/lominus/internal/app/updater/updater.go:github.com/beebeeoii/lominus/internal/app/updater.DoSelfUpdate:43)

would guess that it does not have the permissions to create .lominus.new?

@Beebeeoii
Copy link
Owner

ill go ahead and close this PR as it is all merged into feat-auto-update and pending PR #81 into development. thank you so much !

@Beebeeoii Beebeeoii closed this Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auto update/check for updates
2 participants