As was initially announced at the October 2014 developer meeting, we were working on the Plugins directory improvements that would allow plugin maintainers to easily release new plugin versions based on Git tags. I am happy to announce some progress on this feature.
The Plugins directory now integrates with Github, the most popular hosting site for Moodle plugins code. When adding a new version of a plugin, the list of available tags are fetched from the Github and presented in a drop-down menu.
Selecting the tag and pressing the "Release" button does two things:
- The ZIP of the tagged version is loaded into the filepicker so that you do not need to upload it manually.
- The fields VCS tag, Changelog URL and Alternate download URL are automatically pre-populated with a reasonable value.
To be able to use this new feature, you just have to make sure that the Source control URL field of your plugin record points to the Github repository of the plugin. And of course, you have to tag your code in advance. You can read more on Git tags in their documentation.
Together with this improvement, we also slightly changed another feature. As you probably know, the contents of the README file is used as the default value of the Release notes for the new version. From now on, if there is a file called CHANGES in the root of your repository, it will be used instead of the README file as the source for the release notes. Extensions .md, .txt, .htm and .html are supported, too (with Markdown being recommended as it proved to lead to well formatted text in both web and text terminal interface).
I hope you will enjoy these small yet nice improvements.
Does it automatically rename the folder in the 'zip'? i.e. one of the existing 'system' tick boxes for the manual method.
Is the licence automatically set at pubic domain rather than creative commons?
Functionality is awesome, it makes it much easier to release new version - thank you!
I'm pretty sure I've left "Rename root directory" checked and yet I ended up with original (as exported from github) directory name. I guess renaming does not work for plugins in "other" category. It would be nice to rename the directory into something - e.g. plugin name.
I guess you are right. Renaming plugins that are not valid Moodle components with frankenstyle name associated is a bit tricky though. I assume that in 99% of cases, the user will want to rename and/or move the folder anyway. So in this particular case, my +1 to leave it as it is.
I really enjoyed using this - very smooth. One issue I've hit though is that it doesn't handle submodules - it leaves an empty folder. Is this a known issue?
I'm not sure where to report bugs with the plugins directory, so I'm mentioning it here and will also add it to the Moodle Tracker.
The plugin in question that uses submodules is the Tin Can launch link: https://moodle.org/plugins/pluginversion.php?id=9883 and on github: https://github.com/garemoko/moodle-mod_tincanlaunch
Tracker issue: https://tracker.moodle.org/browse/MDLSITE-4333
Clicking download as zip on Github also has the same problem and it seems like a problem for a few projects on the internet.
Another is to say that the Github integration does not support plugins with submodules and force me to build the zip file by hand. Probably the best option if use of submodules is rare.
I guess another would be some way for plugins to declare code library dependencies. Currently if two plugins use TinCanPHP, then the library has to be included in each plugin.