Moodle Plugins directory: gitplugins | Moodle.org
gitplugins
Utilities
Maintained by
Guillaume Allègre
A cli administration tool to help deploying Moodle plugins via Git
Latest release:
4 downloads
12 fans
Current versions available: 1
gitplugins is a very light (single file) administration tool to help deploying Moodle plugins via Git.
You need to install one single file in the
You need to install one single file in the
/admin/cli/ directory, the gitplugins.php script.The gitplugins.conf file is a list of all the plugins you want to manage (install, upgrade...) with the format:
'local/mailtest' => [
'path' => '/local/mailtest', // mandatory ; path from the moodle root
'gitrepository' => 'https://github.com/michael-milette/moodle-local_mailtest', // mandatory
'gitbranch' => '', // optional ; git branch (incompatible with gitrevision)
'gitrevision' => '', // optional ; precise git revision (hash or tag) (incompatible with gitbranch)
],
You can then launch php gitplugins.php with one of the options:
--gen-configgenerates a sample gitplugins.conf file--checkchecks the consistency of 'gitplugins.conf'--diagdisplays a diagnostic of all declared plugins--statuslaunches agit statuson each declared plugin--installinstalls all plugins that are not already present (git clone)--upgradeupgrades all plugins already installed (git fetch+git checkout)--cleanup"removes" all plugins in an inconsistent state (by renaming them, so restoration is possible)--gen-excludegenerates a chunk of lines to insert in your.git/info/excludefile
"Cleaned" repositories are renamed to <orig-name>.back-<timestam>, so you can easily find and restore them if needed.
Useful links
Contributors
Guillaume Allègre (Lead maintainer)
Please login to view contributors details and/or to contact them
distinction --install / --install-all and --upgrade / --upgrade-all
--install-all installs all plugins that are not already present
--install= installs this plugin according to gitplugins.conf
--upgrade-all upgrades all plugins already installed
--upgrade= upgrades this plugin according to gitplugins.conf
* minor bugfixes and enhancements
* self-executable from unix cli (/usr/bin/env php)
* no need to load the main config.php anymore, so no permission troubles
* --list displays a compact list of all declared plugins
* gitplugins --status-all displays a summary of modified files at the end of the command
Some conventions have changed : you must define an environment variable MOODLE_ROOT and the config and log files are hidden files, located in the moodle root.
So you can "install" one single `gitp.phar` to manage several instances.
All the details are available in the github repository, README.md.