Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop raising minimum QGIS version to 3.14 #275

Merged
merged 4 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 :

Expand Down
7 changes: 2 additions & 5 deletions qgispluginci/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand All @@ -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]:
"""
Expand Down
40 changes: 6 additions & 34 deletions qgispluginci/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
BuiltResourceInSources,
GithubReleaseCouldNotUploadAsset,
GithubReleaseNotFound,
MissingChangelog,
UncommitedChanges,
)
from qgispluginci.parameters import Parameters
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
)
8 changes: 2 additions & 6 deletions test/test_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down