Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Add an auto-update functionality #1

Open
asticode opened this issue Nov 8, 2017 · 4 comments
Open

Add an auto-update functionality #1

asticode opened this issue Nov 8, 2017 · 4 comments
Assignees

Comments

@asticode
Copy link
Owner

asticode commented Nov 8, 2017

No description provided.

@asticode asticode self-assigned this Nov 8, 2017
@craigsc
Copy link
Contributor

craigsc commented Jun 8, 2018

Were you looking at using a particular framework or method? This is on my list of P1 features for my own app which is using this bootstrapper, I'd be more than happy to integrate it and push it upstream if it's a negligible amount of added work (since I already need to do it).

@asticode
Copy link
Owner Author

asticode commented Jun 9, 2018

I didn't want to use any framework as I wanted to keep things as simple as possible.

What I had in mind is the following:

  • the bootstrap has a Versioner option which is an interface along the lines of :
type Versioner interface {
  LastVersion() (Version, error)
}

type Version struct {
  Name string // Example: v1.2.3
  URL string // Example: http://mysite.com/path/to/file
}
  • in the Run method, the bootstrap would check if this interface != nil, and if so would get the last version
  • it would check whether the last version is different from the current version (which means the current version would need to be added as an ldflags in the bundler)
  • if a newer version was available, it would download the files, replace the current files and display a message to the user saying that a newer version is available and he/she needs to restart the app

That being said, the Versioner interface would have to be set with something that exists : that's where the deployer project comes in. I started it a month ago to try things out and here is what I had in mind:

  • this project has a private server only available to the developer where he/she can add projects and for each project upload binaries/files for specific OSes with specific version names on a nice UI in the browser
  • this project also has a public server which can provide the last version available for a specific project that is to say implementing the Versioner interface

Does that make sense

@Happy-Ferret
Copy link

Curious.
Would some of the code provided by itch.io's installer help with this task?

https://github.com/itchio/itch-setup

@asticode
Copy link
Owner Author

asticode commented Sep 4, 2019

I think it would help indeed!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants