-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add support for certificate type DEVELOPER_ID_APPLICATION_G2
#415
Add support for certificate type DEVELOPER_ID_APPLICATION_G2
#415
Conversation
src/codemagic/tools/app_store_connect/action_groups/certificates_action_group.py
Outdated
Show resolved
Hide resolved
only the passed type. | ||
""" | ||
resolved_types = CertificateType.resolve(certificate_types=certificate_type) | ||
assert resolved_types == [certificate_type] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be
assert resolved_types == [certificate_type] | |
assert resolved_types == certificate_type |
instead?
Since certificate_type
is already a list of all possible certificate types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, we parametrize over the values in CertificateType
enumeration. Each certificate_type
is an instance of CertificateType
. Something like
>>> class E(Enum):
... A = 'A'
... B = 'B'
...
>>> list(E)
[<E.A: 'A'>, <E.B: 'B'>]
@@ -200,6 +211,39 @@ def from_profile_type(cls, profile_type: ProfileType) -> CertificateType: | |||
else: | |||
raise ValueError(f"Certificate type for profile type {profile_type} is unknown") | |||
|
|||
@classmethod | |||
def resolve( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not quite obvious what we resolve. Consider naming it like list_expected_certificate_types
. Or just add a docstring with a brief explanation...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in eca517b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few minor remarks
Co-authored-by: Artemii <40743076+artemii-yanushevskyi@users.noreply.github.com>
…-id-application-g2' of github.com:codemagic-ci-cd/cli-tools into bugfix/414-app-store-connect-certificate-type-developer-id-application-g2
return [] | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was suddenly picked up by mypy
. This is a generator function and return values are meaningless as the function does not return a single value at any point, but a generator object. This return just ensures that we're never going to reach a yield
statement.
Resolves #414
When creating Developer ID Application certificate in Apple Developer Portal, it is possible to select "G2 Sub-CA" for its profile type:
The certificate that is created will have type
DEVELOPER_ID_APPLICATION_G2
, which as of 04.07.24 is not documented as a possible certificate type, but is used nonetheless.Changes in this PR add bindings for this type and make it possible to use such certificates when requesting certificates for provisioning profiles of type
MAC_APP_DIRECT
andMAC_CATALYST_APP_DIRECT
.Updated actions:
app-store-connect fetch-signing-files
app-store-connect certificates list