PGM
PGM copied to clipboard
Add auto-update support
PGM will look for new versions of itself on startup, and put the new JAR in the update/
folder. This setting should be default on, but optionally disabled in the config.
I'm not convinced that the default on this setting should be true. If you're installing a server i doubt you want your software to be updating without you knowing. It can lead to behaviour changes or potentially something breaking, without you even being aware of it.
In cardinal we had /cardinal -v
wich would print out the version (git commit), and if there was a newer one available, and /cardinal -u
wich would peroform the same check, and download the update if one was available.
Aditionally we had the autoupdate config (default=false) wich would check for updates every hour & download them.
Pretty much every plugin (or mod) that has an update checker, does just that, checks for updates and prints in the chat if there is an update. And the actual update checker itself could be on by default and set to off in the config.
And I think usually it checks for updates when the server starts, which means it will check when the server restarts which sounds reasonable to me.
I'm okay with having an update command to confirm you want to update, then an option in the config to disable it entirely.
Well the idea was a config for automatic updating without interaction. Maybe a 3-option config with update-behaviour: auto | check | disable
could be the best of them
This would be easier to implement with proper version naming after new features/bugfixes/refactors? Instead of latest commit id
Like: PGM 1.0 PGM 1.0.10 PGM 1.3.4 PGM 2.0
I don't think they're related. PGM would always update to whatever is the latest commit in the master branch, no matter what version it belongs to
@Pablete1234 Ideally they really shouldn't. Unless users opt in to "bleeding" updates, they should generally only get stable releases (after a thorough beta test and a number of additions/changes).
That's what the master branch is supposed to be for. Master is supposed to be stable, we can have prerelease/beta branches for bleeding edge, once stuff on beta is working correctly and has been tested, merge on master at wich point it can be auto-updated