22
33set -euo pipefail
44
5+ XCRESULT_PATH=" ${1:? Error: xcresult path required as first argument} "
6+ DERIVED_DATA_PATH=" ${2:? Error: DerivedData path required as second argument} "
7+
58echo " --- :xcode: Store raw xcresulttool JSONs"
69
710mkdir -p build/xcresulttool
811
912xcrun xcresulttool get build-results \
10- --path build/results/Simplenote.xcresult \
13+ --path " $XCRESULT_PATH " \
1114 --format json > build/xcresulttool/xcresulttool-build-results.json
15+ buildkite-agent artifact upload " build/xcresulttool/xcresulttool-build-results.json"
1216
1317xcrun xcresulttool get test-results tests \
14- --path build/results/Simplenote.xcresult \
18+ --path " $XCRESULT_PATH " \
1519 --format json > build/xcresulttool/xcresulttool-tests-results.json
20+ buildkite-agent artifact upload " build/xcresulttool/xcresulttool-tests-results.json"
1621
1722echo " +++ :json: Extract build info from xcresulttool"
1823jq ' {
@@ -36,17 +41,19 @@ mkdir -p build/xclogparser-reports
3641echo " ~~~ Dump xcactivitylog to JSON"
3742xclogparser dump \
3843 --xcodeproj Simplenote.xcodeproj \
39- --derived_data ./DerivedData \
44+ --derived_data " $DERIVED_DATA_PATH " \
4045 --output build/xclogparser-reports/xcactivitylog-raw.json
46+ buildkite-agent artifact upload " build/xclogparser-reports/xcactivitylog-raw.json"
4147echo " ~~~ Generate HTML report"
4248xclogparser parse \
4349 --xcodeproj Simplenote.xcodeproj \
44- --derived_data ./DerivedData \
50+ --derived_data " $DERIVED_DATA_PATH " \
4551 --reporter html \
4652 --rootOutput build/xclogparser-reports
4753echo " ~~~ Generate JSON report"
4854xclogparser parse \
4955 --xcodeproj Simplenote.xcodeproj \
50- --derived_data ./DerivedData \
56+ --derived_data " $DERIVED_DATA_PATH " \
5157 --reporter json > build/xclogparser-reports/report.json
58+ buildkite-agent artifact upload " build/xclogparser-reports/report.json"
5259
0 commit comments