PGM icon indicating copy to clipboard operation
PGM copied to clipboard

Add auto-update support

Open Electroid opened this issue 5 years ago • 8 comments

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.

Electroid avatar Nov 02 '19 18:11 Electroid

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.

Pablete1234 avatar Nov 03 '19 09:11 Pablete1234

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.

Brottweiler avatar Nov 03 '19 11:11 Brottweiler

I'm okay with having an update command to confirm you want to update, then an option in the config to disable it entirely.

Electroid avatar Nov 03 '19 15:11 Electroid

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

Pablete1234 avatar Nov 03 '19 17:11 Pablete1234

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

KingOfSquares avatar Feb 18 '20 10:02 KingOfSquares

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 avatar Feb 18 '20 18:02 Pablete1234

@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).

AustinLMayes avatar Feb 19 '20 03:02 AustinLMayes

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

Pablete1234 avatar Feb 19 '20 12:02 Pablete1234