Pretty and smart Xcode archive step logs

In our Xcode build steps we use xcpretty to prettify the output of the raw Xcode build log. The raw logs are stored in a temporary directory, so if you want to inspect a failure in detail, you can find the original output.

While xcpretty produces much more digestible output, it is quite common that you can't tell the exact error from the prettified output, but it's included at the end of the raw Xcode build log. So we updated our Xcode steps to print the last 10 lines of the build log into the standard output if the step failed and the output tool was xcpretty. This does not concern the full log, the file is still available.

The new log looks this pretty. 😉

▸ Check Dependencies

❌  Code signing is required for product type 'Application' in SDK 'iOS 10.3'


If you can't find the reason of the error in the log, please check the raw-xcodebuild-output.log
The log file is stored in $BITRISE_DEPLOY_DIR, and its full path
is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable
Archive failed, error: exit status 65
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | [email protected] (exit code: 1)                            | 19 sec   |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/steps-xcode-archive/issues      |
| Source: https://github.com/bitrise-io/steps-xcode-archive                    |
+---+---------------------------------------------------------------+----------+

The end of the raw log looks like this:

Check dependencies
Signing for "Ngenic Tune" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'

** ARCHIVE FAILED **


The following build commands failed:
	Check dependencies
(1 failure)

Happy prettifying!

Get Started for free

Start building now, choose a plan later.

Sign Up

Get started for free

Start building now, choose a plan later.