From 2396fd3578b2912d45e13e179cb53a5ef34aa5f5 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Tue, 23 Jul 2019 10:04:35 +0200 Subject: [PATCH] doc and osgeo credentials --- README.md | 27 +++++++++++++++------------ scripts/qgis-plugin-ci | 31 +++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 3058ee1c..2175b776 100644 --- a/README.md +++ b/README.md @@ -3,37 +3,40 @@ Contains scripts to perform automated testing and deployment for QGIS plugins. These scripts are written for and tested on GitHub, Travis-CI and Transifex. -## Base functionality - - Deploy plugin releases on QGIS official plugin repository - Publish plugin in Github releases, option to deploy a custom repository - Easily integrated in Travis-CI - Completely handle translations with Transifex: create the project and the languages, pull and push translations -# Quickstart guide +# Base functionality - -# QRC and UI files +## QRC and UI files - any .qrc file in the source top directory (plugin_path) will be compiled and output as filename_rc.py. You can then import it using ``import plugin_path.resources_rc`` - currently, qgis-plugin-ci does not compile any .ui file. -# Debug +## Publishing plugins + +When releasing, you can publish the plugin : + +1. In the official QGIS plugin repository. You need to provide user name and password for your Osgeo account. +2. As a custom repository in Github releases and which can be added later in QGIS. The address will be: https://github.com/__ORG__/__REPO__/releases/latest/download/plugins.xml + +# Advanced functionality + +## Debug In any Python module, you can have a global variable as `DEBUG = True`, which will be changed to `False` when packaging the plugin. -# Excluding files in the plugin archive +## Excluding files in the plugin archive If you want to avoid some files to be shipped with your plugin, create a ``.gitattributes`` file in which you can specify the files to ignore. For instance: ``` resources.qrc export-ignore ``` - - -# Activating unit tests - - # Sample plugins +* https://github.com/VeriVD/qgis_VeriVD + diff --git a/scripts/qgis-plugin-ci b/scripts/qgis-plugin-ci index 7561112d..50a1e4a6 100755 --- a/scripts/qgis-plugin-ci +++ b/scripts/qgis-plugin-ci @@ -20,19 +20,28 @@ if __name__ == "__main__": # package package_parser = subparsers.add_parser('package', help='creates an archive of the plugin') package_parser.add_argument('release_version', help='The version to be released') - package_parser.add_argument('--transifex-token', help='The Transifex API token. ' - 'If specified translations will be pulled and compiled.') + package_parser.add_argument( + '--transifex-token', + help='The Transifex API token. If specified translations will be pulled and compiled.' + ) # release release_parser = subparsers.add_parser('release', help='release the plugin') release_parser.add_argument('release_version', help='The version to be released') - release_parser.add_argument('--transifex-token', help='The Transifex API token. ' - 'If specified translations will be pulled and compiled.') - release_parser.add_argument('--github-token', help='The Github API token. ' - 'If specified, the archive will be pushed to an already ' - 'existing release.') - release_parser.add_argument('--create-plugin-repo', action='store_true', - help='Will create a XML repo as a Github release asset. Github token is required.') + release_parser.add_argument( + '--transifex-token', + help='The Transifex API token. If specified translations will be pulled and compiled.' + ) + release_parser.add_argument( + '--github-token', + help='The Github API token. If specified, the archive will be pushed to an already existing release.' + ) + release_parser.add_argument( + '--create-plugin-repo', action='store_true', + help='Will create a XML repo as a Github release asset. Github token is required.' + ) + release_parser.add_argument('--osgeo-username', help='The Osgeo user name to publish the plugin.') + release_parser.add_argument('--osgeo-password', help='The Osgeo password to publish the plugin.') # pull-translation pull_tr_parser = subparsers.add_parser('pull-translation', help='pull translations from Transifex') @@ -72,7 +81,9 @@ if __name__ == "__main__": release_version=args.release_version, transifex_token=args.transifex_token, github_token=args.github_token, - upload_plugin_repo_github=args.create_plugin_repo + upload_plugin_repo_github=args.create_plugin_repo, + osgeo_username=args.osgeo_username, + osgeo_password=args.osgeo_password ) if not success: exit_val = 1