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

Automatic updates #19

Open
jjkola opened this issue Jul 18, 2024 · 3 comments
Open

Automatic updates #19

jjkola opened this issue Jul 18, 2024 · 3 comments

Comments

@jjkola
Copy link
Collaborator

jjkola commented Jul 18, 2024

chroot-distro should support updateJson property for module.prop file and the associated update JSON file. This makes updating to a new version easier as there is no need for the user to download the updated version separately.

@jjkola
Copy link
Collaborator Author

jjkola commented Jul 18, 2024

There is three options how to proceed with this:

  • Having the update JSON file in the main branch and keep it pointing to newest version.

    • This option does have the drawback of older versions of always pointing to main branch thus if user/we don't want their version from updating to latest available one, then it would require going through the hoops to prevent that. Most likely will have to handled with third option (old versions point to main branch which points to known compatible version from which point on wards the update will be handled by the separate place)
    • This would be quite simple and the update would be atomic as we can first make the release first and then point to the correct version.
  • Having the update JSON file in release branch

    • Requires updating the previous release branch with information about newest release branch. That would mean for the user that they would have to jump from minor version to next one to get to the latest version, or alternatively we would have to point X prior versions to latest version, so that users will not have to install all the versions.
    • This has the benefit of doing controlled updates for most people. But then again users could download latest version from the releases and jump directly to newest version.
    • This requires that the release branch update JSON file is updated after the release to ensure that people will get correct version thus requiring at least two commits.
  • Having the update JSON file in separate place (updateJson would not point directly at source control)

    • No need for version control managing
    • Controlled updates
    • Version update only requires one commit (module.prop, and maybe update JSON file depending on how this is implemented)
    • Needs maintenance (depending on how this is implemented)

@YasserNull
Copy link
Collaborator

I didn't understand the idea automatic updates

@jjkola
Copy link
Collaborator Author

jjkola commented Jul 20, 2024

It is not automatic in the sense that it would update itself automatically but in the sense that package managers (for example mrepo) can read the update JSON file (with the help of updateJson property) to determine if there is a newer version available. I have been thinking about this and I think the best option would be to point outside of version control. This way it should be easy to point to the latest version regardless of the version used. This would also help version control as we don't need to keep release branches for ever and can prune old ones (tags can be used for returning to old version if needed, for example for bug checking).

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

No branches or pull requests

2 participants