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: 6 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
-------------

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_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`
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_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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = [
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.58.3.dev"
__version__ = "0.59.0.dev"
__url__ = "https://github.com/codemagic-ci-cd/cli-tools"
__licence__ = "GNU General Public License v3.0"
9 changes: 0 additions & 9 deletions src/codemagic/apple/resources/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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))

Expand Down
6 changes: 2 additions & 4 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_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,
Expand Down Expand Up @@ -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
]
Expand Down