From 3bb2b0cb56ae4ddc0239873b4c05f3a209d42cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20L=C3=A4tt?= Date: Fri, 11 Sep 2020 17:15:13 +0300 Subject: [PATCH] Improvement: Improv error handling for missing export options on build-ipa (#51) * Improve error handling for build-ipa action for missing export options * Update changelog * Restore project and workspace validation --- CHANGELOG.md | 7 +++++++ src/codemagic/__version__.py | 2 +- src/codemagic/tools/xcode_project.py | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59e3caf5..00c362db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Version 0.2.12 +------------- + +**Improvements** + +- Improvement: Fail gracefully with appropriate error message when non-existent export options plist path is passed to `xcode-project build-ipa`. + Version 0.2.11 ------------- diff --git a/src/codemagic/__version__.py b/src/codemagic/__version__.py index b1d8d489..fa288acd 100644 --- a/src/codemagic/__version__.py +++ b/src/codemagic/__version__.py @@ -1,5 +1,5 @@ __title__ = "codemagic-cli-tools" __description__ = "CLI tools used in Codemagic builds" -__version__ = "0.2.11" +__version__ = "0.2.12" __url__ = 'https://github.com/codemagic-ci-cd/cli-tools' __licence__ = 'GNU General Public License v3.0' diff --git a/src/codemagic/tools/xcode_project.py b/src/codemagic/tools/xcode_project.py index a49f8d4f..71eb6355 100644 --- a/src/codemagic/tools/xcode_project.py +++ b/src/codemagic/tools/xcode_project.py @@ -302,6 +302,9 @@ def build_ipa(self, if xcode_project_path is None and xcode_workspace_path is None: error = 'Workspace or project argument needs to be specified' XcodeProjectArgument.XCODE_WORKSPACE_PATH.raise_argument_error(error) + if not export_options_plist.is_file(): + error = f'Path "{export_options_plist}" does not exist' + XcodeProjectArgument.EXPORT_OPTIONS_PATH.raise_argument_error(error) xcarchive: Optional[pathlib.Path] = None xcodebuild: Optional[Xcodebuild] = None