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
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
Version 0.64.0
-------------

This release contains changes from [PR #489](https://github.com/codemagic-ci-cd/cli-tools/pull/489).

**Features**
- Update default argument values for tool `app-store-connect` to be consistent with Xcode 16.0+. This changes where downloaded signing files are saved by default.
- Argument `--certificates-dir` defaults now to `~/Library/Developer/Xcode/UserData/Certificates`.
- Argument `--profiles-dir` defaults now to `~/Library/Developer/Xcode/UserData/Provisioning Profiles`.
- Update action `keychain add-certificates` argument `--certificate` to look up certificates from `~/Library/Developer/Xcode/UserData/Certificates`. Old certificates location remains also included in the default glob patterns.
- Update action `xcode-project use-profiles` argument `--profile` to look up provisioning profiles from `~/Library/Developer/Xcode/UserData/Provisioning Profiles.` by default. Old certificates location remains also included in the default glob patterns.

**Docs**
- Update docs for `app-store-connect`.
- Update docs for `keychain add-certificates`.
- Update docs for `xcode-project use-profiles`.

Version 0.63.0
-------------

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.63.0"
version = "0.64.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.63.0.dev"
__version__ = "0.64.0.dev"
__url__ = "https://github.com/codemagic-ci-cd/cli-tools"
__licence__ = "GNU General Public License v3.0"
5 changes: 4 additions & 1 deletion src/codemagic/models/certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@


class Certificate(JsonSerializable, RunningCliAppMixin, StringConverterMixin):
DEFAULT_LOCATION = pathlib.Path(pathlib.Path.home(), "Library", "MobileDevice", "Certificates")
# This location is not generally recognized by Apple in any way. Just keep it in sync with
# the provisioning profiles directory.
DEFAULT_LOCATION = pathlib.Path.home() / "Library" / "Developer" / "Xcode" / "UserData" / "Certificates"
LEGACY_LOCATION = pathlib.Path.home() / "Library" / "MobileDevice" / "Certificates"

def __init__(self, certificate: x509.Certificate):
if hasattr(certificate, "to_cryptography"):
Expand Down
7 changes: 6 additions & 1 deletion src/codemagic/models/provisioning_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@


class ProvisioningProfile(JsonSerializable, RunningCliAppMixin, StringConverterMixin):
DEFAULT_LOCATION = pathlib.Path(pathlib.Path.home(), "Library", "MobileDevice", "Provisioning Profiles")
# Xcode versions up to 15.x expected profiles to be stored in '~/Library/MobileDevice/Provisioning Profiles'.
# This is also where Xcode's auto-managed profiles were put. Since Xcode 16.0 profiles are stored in
# '~/Library/Developer/Xcode/UserData/Provisioning Profiles' instead. Keep a reference to the old location
# for backwards compatibility.
DEFAULT_LOCATION = pathlib.Path.home() / "Library" / "Developer" / "Xcode" / "UserData" / "Provisioning Profiles"
LEGACY_LOCATION = pathlib.Path.home() / "Library" / "MobileDevice" / "Provisioning Profiles"

def __init__(self, plist: Dict[str, Any]):
self._plist = plist
Expand Down
2 changes: 2 additions & 0 deletions src/codemagic/tools/_xcode_project/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ class XcodeProjectArgument(cli.Argument):
"default": (
ProvisioningProfile.DEFAULT_LOCATION / "*.mobileprovision",
ProvisioningProfile.DEFAULT_LOCATION / "*.provisionprofile",
ProvisioningProfile.LEGACY_LOCATION / "*.mobileprovision",
ProvisioningProfile.LEGACY_LOCATION / "*.provisionprofile",
),
},
)
Expand Down
10 changes: 8 additions & 2 deletions src/codemagic/tools/app_store_connect/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,14 +522,20 @@ class AppStoreConnectArgument(cli.Argument):
flags=("--certificates-dir",),
type=pathlib.Path,
description="Directory where the code signing certificates will be saved",
argparse_kwargs={"required": False, "default": Certificate.DEFAULT_LOCATION},
argparse_kwargs={
"required": False,
"default": Certificate.DEFAULT_LOCATION,
},
)
PROFILES_DIRECTORY = cli.ArgumentProperties(
key="profiles_directory",
flags=("--profiles-dir",),
type=pathlib.Path,
description="Directory where the provisioning profiles will be saved",
argparse_kwargs={"required": False, "default": ProvisioningProfile.DEFAULT_LOCATION},
argparse_kwargs={
"required": False,
"default": ProvisioningProfile.DEFAULT_LOCATION,
},
)


Expand Down
5 changes: 4 additions & 1 deletion src/codemagic/tools/keychain.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ class KeychainArgument(cli.Argument):
"required": False,
"nargs": "+",
"metavar": "certificate-path",
"default": (Certificate.DEFAULT_LOCATION / "*.p12",),
"default": (
Certificate.DEFAULT_LOCATION / "*.p12",
Certificate.LEGACY_LOCATION / "*.p12",
),
},
)
CERTIFICATE_PASSWORD = cli.ArgumentProperties(
Expand Down