Skip to content
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Version 0.68.0
-------------

**Features**
- Restore support for certificate type `DEVELOPER_ID_APPLICATION_G2` in `codemagic.apple.resources.CertificateType`. Apple [documents it as a valid certificate type](https://developer.apple.com/documentation/appstoreconnectapi/certificatetype) again after it had been temporarily deprecated in [version 0.59.0](https://github.com/codemagic-ci-cd/cli-tools/releases/tag/v0.59.0). This re-enables `app-store-connect certificates create` and `app-store-connect certificates list` invoked with `--type=DEVELOPER_ID_APPLICATION_G2`, as well as macOS direct distribution signing flows invoked with `--profile-type=MAC_APP_DIRECT` or `--profile-type=MAC_CATALYST_APP_DIRECT`.

**Docs**
- Update docs for `app-store-connect certificates create`.
- Update docs for `app-store-connect certificates list`.

Version 0.67.0
-------------

Expand Down
2 changes: 1 addition & 1 deletion docs/app-store-connect/certificates/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_KEXT | DEVELOPMENT | DISTRIBUTION | IOS_DEVELOPMENT | IOS_DISTRIBUTION | MAC_APP_DEVELOPMENT | MAC_APP_DISTRIBUTION | MAC_INSTALLER_DISTRIBUTION`
##### `--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 of the certificate. Default: `IOS_DEVELOPMENT`
Expand Down
2 changes: 1 addition & 1 deletion docs/app-store-connect/certificates/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_KEXT | DEVELOPMENT | DISTRIBUTION | IOS_DEVELOPMENT | IOS_DISTRIBUTION | MAC_APP_DEVELOPMENT | MAC_APP_DISTRIBUTION | MAC_INSTALLER_DISTRIBUTION`
##### `--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 of the certificate. Multiple arguments
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "codemagic-cli-tools"
version = "0.67.0"
version = "0.68.0"
description = "CLI tools used in Codemagic builds"
authors = [{ name = "Priit Lätt", email = "priit@nevercode.io" }]
requires-python = ">=3.8,<4"
Expand Down
2 changes: 1 addition & 1 deletion src/codemagic/__version__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = "codemagic-cli-tools"
__description__ = "CLI tools used in Codemagic builds"
__version__ = "0.67.0.dev"
__version__ = "0.68.0.dev"
__url__ = "https://github.com/codemagic-ci-cd/cli-tools"
__licence__ = "GNU General Public License v3.0"
8 changes: 8 additions & 0 deletions src/codemagic/apple/resources/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ class CertificateType(ResourceEnum):
"""

DEVELOPER_ID_APPLICATION = "DEVELOPER_ID_APPLICATION"
DEVELOPER_ID_APPLICATION_G2 = "DEVELOPER_ID_APPLICATION_G2"
DEVELOPER_ID_KEXT = "DEVELOPER_ID_KEXT"
DEVELOPMENT = "DEVELOPMENT"
DISTRIBUTION = "DISTRIBUTION"
Expand Down Expand Up @@ -267,6 +268,13 @@ def resolve_applicable_types(
elif profile_type is ProfileType.MAC_APP_STORE:
types.append(CertificateType.MAC_APP_DISTRIBUTION)

# macOS direct distribution profiles primarily map to "DEVELOPER_ID_APPLICATION" (see
# `from_profile_type` above), but they can equally be signed with its newer "G2" generation.
# The provisioning profile keeps the same type regardless of which certificate generation it
# was created with.
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))

Expand Down
6 changes: 4 additions & 2 deletions tests/apple/resources/enums/test_certificate_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, CertificateType.DEVELOPER_ID_APPLICATION_G2],
),
(
ProfileType.MAC_CATALYST_APP_DIRECT,
[CertificateType.DEVELOPER_ID_APPLICATION],
[CertificateType.DEVELOPER_ID_APPLICATION, CertificateType.DEVELOPER_ID_APPLICATION_G2],
),
(
ProfileType.MAC_APP_STORE,
Expand Down Expand Up @@ -148,10 +148,12 @@ 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
]
Expand Down
Loading