Skip to content

Commit

Permalink
fix usage with empty TX token (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored Feb 23, 2024
1 parent 5b8f518 commit 30ea05f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qgispluginci/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from glob import glob
from pathlib import Path
from tempfile import mkstemp
from typing import List
from typing import List, Tuple

import git
from github import Github, GithubException
Expand Down Expand Up @@ -55,7 +55,7 @@ def create_archive(
is_prerelease: bool = False,
raise_min_version: str = None,
disable_submodule_update: bool = False,
asset_paths: List[str] = [],
asset_paths: Tuple[str] = (),
):
repo = git.Repo()

Expand Down Expand Up @@ -563,7 +563,7 @@ def release(
parameters,
release_version,
archive_name,
add_translations=tx_api_token is not None,
add_translations=bool(tx_api_token),
allow_uncommitted_changes=allow_uncommitted_changes,
is_prerelease=is_prerelease,
disable_submodule_update=disable_submodule_update,
Expand Down
7 changes: 7 additions & 0 deletions test/test_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ def test_release_from_pyproject(self):
print(self.pyproject_params)
release(self.pyproject_params, RELEASE_VERSION_TEST)

def test_release_with_empty_tx_token(self):
release(
self.qgis_plugin_config_params,
RELEASE_VERSION_TEST,
tx_api_token="",
)

@unittest.skipIf(can_skip_test(), "Missing tx_api_token")
def test_release_with_transifex(self):
Translation(self.qgis_plugin_config_params, tx_api_token=self.tx_api_token)
Expand Down

0 comments on commit 30ea05f

Please sign in to comment.