codemagic-ci-cd / cli-tools

Various utilities to managing Android and iOS app builds, code signing, and deployment.
https://codemagic.io/start/
GNU General Public License v3.0
235 stars 39 forks source link

Add certificate type mappings for all provisioning profile types #378

Closed priitlatt closed 7 months ago

priitlatt commented 7 months ago

Certificate type resolving from provisioning profile types MAC_CATALYST_APP_DEVELOPMENT, MAC_CATALYST_APP_STORE, MAC_CATALYST_APP_DIRECT, IOS_APP_INHOUSE and TVOS_APP_INHOUSE is not defined and as a result invoking CertificateType.from_profile_type with any of those fails with a ValueError:

Traceback (most recent call last):
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 213, in invoke_cli
    CliApp._running_app._invoke_action(args)
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 170, in _invoke_action
    return cli_action(**action_args)
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 465, in wrapper
    return func(self, *args, **kwargs)
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/tools/app_store_connect.py", line 1050, in fetch_signing_files
    certificates = self._get_or_create_certificates(
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/tools/app_store_connect.py", line 1100, in _get_or_create_certificates
    certificate_types = [CertificateType.from_profile_type(profile_type)]
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/apple/resources/enums.py", line 138, in from_profile_type
    raise ValueError(f"Certificate type for profile type {profile_type} is unknown")
ValueError: Certificate type for profile type MAC_CATALYST_APP_STORE is unknown

This PR defines missing mappings from profiles types to certificate types.

Updated actions: