When setting a Grav-Isntallation up in a Repo, it would be useful to have some way to bin/gpm freeze the currently installed Plugins into a file (like we do with the composer dependencies), so that on another machine (production, ci-system, other computer) a single bin/gpm install would install all required plugins and themes.
That sounds like a cool feature. I like that idea.
Sort of creating a .dependencies file?
@flaviocopes yes, exactly. I'm trying to create a Grav-Site whose state is completely controlled via a git repo, so on any machine I can just git clone && composer install and have a running system.
Currently I dassed the plugins as git submodules, which is not too bad, but as you already have a package manager which is capable of installing and updating, this would be a probably small addon which would make a complete git-based system even simpler.
would be cool to create a lock file that contains specific versions of files that can be used by our GPM commands.
I was thinking about this and like composer and yarn do, it would be nice to get to the point where we can create a dependencies.lock file after GPM install/update that would freeze the list of plugins currently installed as well as the version they are at. Including for Grav itself.
This could help backing up and restoring a lot, as well as moving things across servers or even just putting the bare-bone instance on a git repository, without having to copy over the whole user folder.
Is there documentation for the .dependencies file format? I'm interested in poking at this issue if nobody else is already doing so.
I don't know about a proper documentation for it, it's a learn by example at this point.
Time to dive into some code, then. 馃強
@Perlkonig where are you with this? I'd like this as a feature as well.
I'm new to Grav (thanks for Grav!) and was a bit surprised that nothing related to Grav plugin dependencies had been added to my Git repo after installing the admin plugin. Now I know why. :)
As a workaround and an alternative to using Git submodules, would a viable strategy be to rsync my dev installation's user/plugins directory to my production server's installation on each deploy?
I usually install plugins from the GPM (so, no submodules) and store all the user/ folder in the site repo, so I update locally and just push to update the remote site. In this way, there is nothing to do on the remote than a simple git pull with a post-commit hook.
But I can see it useful storing the current version of the installed packages in a config file, and have a CLI command to sync a site to those versions. Also because for private plugins you don't have the GPM and you'll have a submodule in each plugin (assuming you version control them)