ronoaldo / minetools

Utilities for Minetest server management
GNU Lesser General Public License v2.1
19 stars 1 forks source link

Update games #8

Open dacmot opened 1 year ago

dacmot commented 1 year ago

I couldn't figure out how to update games, as well as mods. If it is supported, could you make it clearer in the --help?

If it is not supported, I think it would be a great feature. I feel like it should be fairly simple to do the same as for mods but on a different subfolder.

ronoaldo commented 1 year ago

Hi @dacmot, thanks for the heads up. Just to make sure I understood you properly, you could not find the help on updating games, correct? Or you also feel that the help on updating mods could be clarified?

The current help shows this:

$ contentdb help
NAME:
   contentdb - Minetest ContentDB client implementation for headless server administration

USAGE:
   contentdb [global options] command [command options] [arguments...]

COMMANDS:
   search   search for content
   install  installs new mod into ./mods folder
   update   updates all mods in the ./mods folder
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help (default: false)

And this for the update subcommand (just saw a typo 🤦🏻):

$ contentdb update --help
NAME:
   contentdb update - updates all mods in the ./mods folder

USAGE:
   contentdb update [command options] [arguments...]

OPTIONS:
   --debug, -v, --verbose, -d  show debug information on console (default: false)
   --dry-run                   do not actually perform any opertaions, just report what would be done (default: false)
   --url value                 endpoint of the ContentDB API (default: https://content.minetest.net)
   --help, -h                  show help (default: false)

For the games part, as well as textures, it is not yet supported but I do want to support that feature. Let's track in this issue the progress towards supporting the update of games. Kindly open a separate one if the info on how to update mods works.

Do you have any suggestions on the behavior? What I'm thinking is to mirror the way we update mods, but target the ./games folder. This works well for builds like RUN_IN_PLACE, I feel they are usual for self-hosted servers. This also works for my workflow with Docker!

dacmot commented 1 year ago

Hi @ronoaldo. I suspected it wasn't supported yet. I wanted to make sure I didn't miss it somewhere.

I would probably do it like mods. I think probably the default update should process everything. I would add command options to only update mods, games or textures. (--mods-only, -m, --games-only, -g, --textures-only, -t).

What do you think?

ronoaldo commented 1 year ago

That is a good option indeed! I'll try to draft a PR for testing in the next few days.

rollerozxa commented 5 months ago

Being able to install game and texture pack packages with the tool would be very nice, especially for server owners to install games since the engine does not come bundled with one anymore. I was looking at this tool for linking to it in ContentDB's package installation guide because a CLI tool like this would be much better than cloning from Git where you may get an unreleased version not on ContentDB, and much easier and straight forward than manually downloading and unzipping releases from the command-line on a headless server.

ronoaldo commented 5 months ago

That is cool! Thanks! Do you think that any features should added before adding this to the Install section?