[QGIS-Developer] Deploy plugins directly from github

Alexandre Neto senhor.neto at gmail.com
Fri Jul 21 01:50:53 PDT 2017


Hi!

Check this repo.

https://github.com/SrNetoChan/srnetochan.github.io

This was the way I was able to publish plug-ins that were not of general
interest using github pages. Otherwise is always better to use QGIS
official repo IMO.

Alexandre Neto

A qui, 20/07/2017, 16:52, Olivier Dalang <olivier.dalang at gmail.com>
escreveu:

> Thanks Victor !
>
> I just had a look, and I think there are a few drawbacks compared to the
> workflow I was suggesting.
>
> - updates are not available in the plugin manager, which also means
> there's no notification
> - the dev has no control on which tags are available since he doesn't
> manage a plugin repository xml
>
>
> In the meantime, I found I made a stupid mistake. Github downloads use a
> redirect. If I use
> https://codeload.github.com/dhlab-epfl/GlobalAtlas-qgis/zip/master
> instead of
> https://github.com/dhlab-epfl/GlobalAtlas-qgis/archive/master.zip in the
> xml file, the workaround works !
>
> So the only problem is that one needs to append the name of the branch to
> the plugin.
>
> Maybe it would be a good idea to think a bit more about this type of
> workflow and to support it officially within QGIS ?
>
> Best,
>
> Olivier
>
>
>
>
> 2017-07-20 14:59 GMT+00:00 Victor Olaya <volayaf at gmail.com>:
>
>> I wrote this long time ago...
>>
>> https://github.com/volaya/github-updater
>>
>> I guess it might be helpful for you
>>
>> Cheers
>>
>> 2017-07-20 16:52 GMT+02:00 Olivier Dalang <olivier.dalang at gmail.com>:
>> > Dear List,
>> >
>> > Using QGIS 2.18, I'm trying to find a way to deploy plugins directly
>> from
>> > github using the following procedure :
>> >
>> > 1. Add a plugin.xml file to my repo, with this content :
>> >
>> > <?xml version = '1.0' encoding = 'UTF-8'?>
>> >
>> > <plugins>
>> >     <pyqgis_plugin name="MyPlugin" version="0.0.13">
>> >
>> >         <version>0.0.13</version>
>> >
>> >         <author_name>Olivier Dalang</author_name>
>> >
>> >
>> > <download_url>https://github.com/{username}/MyPlugin/archive/0.0.13.zip
>> </download_url>
>> >
>> >         <file_name>MyPlugin-0.0.13.zip</file_name>
>> >
>> >     </pyqgis_plugin>
>> > </plugins>
>> >
>> > 2. Add the xml repo in QGIS plugin manager
>> >
>> https://raw.githubusercontent.com/{username}/MyPlugin/master/repository.xml
>> >
>> > 3. Create and push a tag named 0.0.13
>> >
>> > If this worked, it would be a big win, as it would allow to deploy
>> plugins
>> > updates really easily, just by creating tags and updating the xml file
>> > whenever I want my users to update the plugin. It avoids having to
>> create
>> > the zip, host it somewhere else, and maintain an up to date xml
>> separately
>> > for each update.
>> >
>> > The only thing is that it doesn't work. I get an error on installing the
>> > plugin : "Plugin installation failed. Failed to unzip package".
>> >
>> > Github appends the tag name (or branch name) to the downloaded folder
>> > (inside the zip). When unpacking the zip, I get a folder called
>> > MyPlugin-0.0.13 instead of just MyPlugin. I suspect this causes the
>> problem.
>> > I tried to workaround this problem by using the master branch, and
>> renaming
>> > my plugin to MyPlugin-master, but I still get the same error. Maybe it
>> is so
>> > that dashes are not supported at all in plugin names ?
>> >
>> > Was anyone able to setup such a workflow ?
>> >
>> > Kind regards,
>> >
>> > Olivier
>> >
>> > _______________________________________________
>> > QGIS-Developer mailing list
>> > QGIS-Developer at lists.osgeo.org
>> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 
Alexandre Neto
---------------------
@AlexNetoGeo
http://sigsemgrilhetas.wordpress.com
http://gisunchained.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170721/f5a852b8/attachment.html>


More information about the QGIS-Developer mailing list