diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 288404bc..23ae08a7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/asottile/add-trailing-comma - rev: v3.1.0 + rev: v3.2.0 hooks: - id: add-trailing-comma - repo: https://github.com/psf/black @@ -14,14 +14,16 @@ repos: - id: black language_version: python3.11 - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.6 + rev: v0.11.13 hooks: - id: ruff args: [ --fix ] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.15.0 + rev: v1.16.0 hooks: - id: mypy - additional_dependencies: [types-requests] + additional_dependencies: + - types-requests + - types-python-dateutil exclude: ^tests/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f9ce019..4dc76942 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +Version 0.59.0 +------------- + +This release contains changes from [PR #467](https://github.com/codemagic-ci-cd/cli-tools/pull/467). + +**Breaking** +- Enumeration value `DEVELOPER_ID_APPLICATION_G2` is removed from `codemagic.apple.resources.CertificateType`. + +**Bugfixes** +- Fix action `app-store-connect fetch-signing-files` when fetching signing files for macOS apps that use direct distribution provisioning profiles (invoked with either option `--type=MAC_APP_DIRECT` or `--type=MAC_CATALYST_APP_DIRECT`). +- Fix action `app-store-connect certificates list` when listing certificates for macOS direct distribution provisioning profiles or explicitly with type `DEVELOPER_ID_APPLICATION_G2` (either invoked with `--profile-type=MAC_APP_DIRECT`, `--profile-type=MAC_CATALYST_APP_DIRECT` or `--type=DEVELOPER_ID_APPLICATION_G2`). +- Fix action `app-store-connect certificates create` when invoked with `--type=DEVELOPER_ID_APPLICATION_G2`. + +**Docs** +- Update docs for `app-store-connect certificates create`. +- Update docs for `app-store-connect certificates list`. + Version 0.58.3 ------------- diff --git a/docs/app-store-connect/certificates/create.md b/docs/app-store-connect/certificates/create.md index adc4495a..b094feb7 100644 --- a/docs/app-store-connect/certificates/create.md +++ b/docs/app-store-connect/certificates/create.md @@ -26,7 +26,7 @@ app-store-connect certificates create [-h] [--log-stream STREAM] [--no-color] [- ``` ### Optional arguments for action `create` -##### `--type=DEVELOPER_ID_APPLICATION | DEVELOPER_ID_APPLICATION_G2 | DEVELOPER_ID_KEXT | DEVELOPMENT | DISTRIBUTION | IOS_DEVELOPMENT | IOS_DISTRIBUTION | MAC_APP_DEVELOPMENT | MAC_APP_DISTRIBUTION | MAC_INSTALLER_DISTRIBUTION` +##### `--type=DEVELOPER_ID_APPLICATION | DEVELOPER_ID_KEXT | DEVELOPMENT | DISTRIBUTION | IOS_DEVELOPMENT | IOS_DISTRIBUTION | MAC_APP_DEVELOPMENT | MAC_APP_DISTRIBUTION | MAC_INSTALLER_DISTRIBUTION` Type of the certificate. Default: `IOS_DEVELOPMENT` diff --git a/docs/app-store-connect/certificates/list.md b/docs/app-store-connect/certificates/list.md index 7791892d..1b9a315b 100644 --- a/docs/app-store-connect/certificates/list.md +++ b/docs/app-store-connect/certificates/list.md @@ -27,7 +27,7 @@ app-store-connect certificates list [-h] [--log-stream STREAM] [--no-color] [--v ``` ### Optional arguments for action `list` -##### `--type=DEVELOPER_ID_APPLICATION | DEVELOPER_ID_APPLICATION_G2 | DEVELOPER_ID_KEXT | DEVELOPMENT | DISTRIBUTION | IOS_DEVELOPMENT | IOS_DISTRIBUTION | MAC_APP_DEVELOPMENT | MAC_APP_DISTRIBUTION | MAC_INSTALLER_DISTRIBUTION` +##### `--type=DEVELOPER_ID_APPLICATION | DEVELOPER_ID_KEXT | DEVELOPMENT | DISTRIBUTION | IOS_DEVELOPMENT | IOS_DISTRIBUTION | MAC_APP_DEVELOPMENT | MAC_APP_DISTRIBUTION | MAC_INSTALLER_DISTRIBUTION` Type of the certificate. Multiple arguments diff --git a/pyproject.toml b/pyproject.toml index 975407d4..d5419dcf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "codemagic-cli-tools" -version = "0.58.3" +version = "0.59.0" description = "CLI tools used in Codemagic builds" readme = "README.md" authors = [ diff --git a/src/codemagic/__version__.py b/src/codemagic/__version__.py index 936ec65d..df444bcb 100644 --- a/src/codemagic/__version__.py +++ b/src/codemagic/__version__.py @@ -1,5 +1,5 @@ __title__ = "codemagic-cli-tools" __description__ = "CLI tools used in Codemagic builds" -__version__ = "0.58.3.dev" +__version__ = "0.59.0.dev" __url__ = "https://github.com/codemagic-ci-cd/cli-tools" __licence__ = "GNU General Public License v3.0" diff --git a/src/codemagic/apple/resources/enums.py b/src/codemagic/apple/resources/enums.py index 25e80eff..afcb9bb2 100644 --- a/src/codemagic/apple/resources/enums.py +++ b/src/codemagic/apple/resources/enums.py @@ -167,8 +167,6 @@ class CertificateType(ResourceEnum): """ DEVELOPER_ID_APPLICATION = "DEVELOPER_ID_APPLICATION" - # Undocumented developer ID certificate with profile type "G2 Sub-CA" - DEVELOPER_ID_APPLICATION_G2 = "DEVELOPER_ID_APPLICATION_G2" DEVELOPER_ID_KEXT = "DEVELOPER_ID_KEXT" DEVELOPMENT = "DEVELOPMENT" DISTRIBUTION = "DISTRIBUTION" @@ -242,13 +240,6 @@ def resolve_applicable_types( elif profile_type is ProfileType.MAC_APP_STORE: types.append(CertificateType.MAC_APP_DISTRIBUTION) - # Developer ID profiles can also be used with undocumented (as of 04.07.24) flavor - # of developer ID application certificates that have special G2 suffix in the type name. - # Said profiles themselves have the same type as before regardless of whether they - # are of type "G2 Sub-GA" or "Previous Sub-GA". - if profile_type in (ProfileType.MAC_APP_DIRECT, ProfileType.MAC_CATALYST_APP_DIRECT): - types.append(CertificateType.DEVELOPER_ID_APPLICATION_G2) - # Remove duplicate entries from the list in order-preserving way. return list(OrderedDict.fromkeys(types)) diff --git a/tests/apple/resources/enums/test_certificate_type.py b/tests/apple/resources/enums/test_certificate_type.py index 51cd4d38..296fa0f0 100644 --- a/tests/apple/resources/enums/test_certificate_type.py +++ b/tests/apple/resources/enums/test_certificate_type.py @@ -114,11 +114,11 @@ def test_resolve_applicable_types_using_profile_type_with_one_match( ), ( ProfileType.MAC_APP_DIRECT, - [CertificateType.DEVELOPER_ID_APPLICATION, CertificateType.DEVELOPER_ID_APPLICATION_G2], + [CertificateType.DEVELOPER_ID_APPLICATION], ), ( ProfileType.MAC_CATALYST_APP_DIRECT, - [CertificateType.DEVELOPER_ID_APPLICATION, CertificateType.DEVELOPER_ID_APPLICATION_G2], + [CertificateType.DEVELOPER_ID_APPLICATION], ), ( ProfileType.MAC_APP_STORE, @@ -148,12 +148,10 @@ def test_resolve_applicable_types_with_multiple_arguments(): profile_type=ProfileType.IOS_APP_STORE, certificate_types=[ CertificateType.DEVELOPER_ID_APPLICATION, - CertificateType.DEVELOPER_ID_APPLICATION_G2, ], ) expected_certificate_types = [ CertificateType.DEVELOPER_ID_APPLICATION, # From "certificate_types" argument - CertificateType.DEVELOPER_ID_APPLICATION_G2, # From "certificate_types" argument CertificateType.DISTRIBUTION, # From given profile type CertificateType.IOS_DISTRIBUTION, # From given profile type ]