From cef1709345f581cd989e523db25af2eb18091d69 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Thu, 4 Jan 2024 10:18:56 +0100 Subject: [PATCH 1/3] drop raising minimum QGIS version to 3.14 for experimental releases + creating two archives --- qgispluginci/parameters.py | 7 ++----- qgispluginci/release.py | 40 ++++++-------------------------------- 2 files changed, 8 insertions(+), 39 deletions(-) diff --git a/qgispluginci/parameters.py b/qgispluginci/parameters.py index f145427d..4ada1871 100755 --- a/qgispluginci/parameters.py +++ b/qgispluginci/parameters.py @@ -305,9 +305,7 @@ def validate_args(args: Namespace): ) @staticmethod - def archive_name( - plugin_name, release_version: str, experimental: bool = False - ) -> str: + def archive_name(plugin_name, release_version: str) -> str: """ Returns the archive file name """ @@ -316,8 +314,7 @@ def archive_name( if "-" in plugin_name: logger.warning(DASH_WARNING) - experimental = "-experimental" if experimental else "" - return f"{plugin_name}{experimental}.{release_version}.zip" + return f"{plugin_name}.{release_version}.zip" def collect_metadata(self) -> Callable[[str, Optional[Any]], Any]: """ diff --git a/qgispluginci/release.py b/qgispluginci/release.py index cb4deb16..27e18c01 100644 --- a/qgispluginci/release.py +++ b/qgispluginci/release.py @@ -31,7 +31,6 @@ BuiltResourceInSources, GithubReleaseCouldNotUploadAsset, GithubReleaseNotFound, - MissingChangelog, UncommitedChanges, ) from qgispluginci.parameters import Parameters @@ -571,24 +570,6 @@ def release( asset_paths=asset_paths, ) - # if pushing to QGIS repo and pre-release, create an extra package with qgisMinVersion to 3.14 - # since only QGIS 3.14+ supports the beta/experimental plugins trial - experimental_archive_name = None - if osgeo_username is not None and is_prerelease: - experimental_archive_name = parameters.archive_name( - parameters.plugin_path, release_version, True - ) - create_archive( - parameters, - release_version, - experimental_archive_name, - add_translations=tx_api_token is not None, - allow_uncommitted_changes=allow_uncommitted_changes, - is_prerelease=True, - raise_min_version="3.14", - disable_submodule_update=disable_submodule_update, - ) - if github_token is not None: upload_asset_to_github_release( parameters, @@ -627,18 +608,9 @@ def release( if osgeo_username is not None: assert osgeo_password is not None - if is_prerelease: - assert experimental_archive_name is not None - upload_plugin_to_osgeo( - username=osgeo_username, - password=osgeo_password, - archive=experimental_archive_name, - server_url=alternative_repo_url, - ) - else: - upload_plugin_to_osgeo( - username=osgeo_username, - password=osgeo_password, - archive=archive_name, - server_url=alternative_repo_url, - ) + upload_plugin_to_osgeo( + username=osgeo_username, + password=osgeo_password, + archive=archive_name, + server_url=alternative_repo_url, + ) From 11e56fbe894200af1a9d5fd9a28200b19c3cdb71 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Thu, 4 Jan 2024 10:26:26 +0100 Subject: [PATCH 2/3] fix docs --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 46ff4ed7..5c26cf03 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,6 @@ Both can be achieved in the same process. ## Pre-release and experimental In the case of a pre-release (either from the tag name according to [Semantic Versioning](https://semver.org/) or from the GitHub release), the plugin will be flagged as experimental. -If pushed to the QGIS plugin repository, the QGIS minimum version will be raised to QGIS 3.14 (only 3.14 and above support testing of experimental versions). The tool will recognise any label use as a suffix to flag it as pre-release : From a8c2345b5a2028beb5409991b627c68f7928a9bf Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Thu, 4 Jan 2024 12:21:51 +0100 Subject: [PATCH 3/3] fix test --- test/test_release.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/test_release.py b/test/test_release.py index 9015afb1..ceec0547 100755 --- a/test/test_release.py +++ b/test/test_release.py @@ -98,12 +98,8 @@ def test_zipname(self): and also capital letters """ self.assertEqual( - "my_plugin-experimental.0.0.0.zip", - Parameters.archive_name("my_plugin", "0.0.0", True), - ) - - self.assertEqual( - "My_Plugin.0.0.0.zip", Parameters.archive_name("My_Plugin", "0.0.0", False) + "my_plugin.0.0.0.zip", + Parameters.archive_name("my_plugin", "0.0.0"), ) with self.assertLogs(