From 10a046aad84227d8bb8b749726a34659a4058913 Mon Sep 17 00:00:00 2001 From: jmkiley Date: Tue, 5 Mar 2019 14:09:04 -0800 Subject: [ios] Added new JSON fields --- circle.yml | 4 ++++ platform/ios/scripts/code-coverage.sh | 13 ++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/circle.yml b/circle.yml index 8b70a74d4d..4966ceb956 100644 --- a/circle.yml +++ b/circle.yml @@ -875,6 +875,10 @@ jobs: - install-macos-dependencies - install-dependencies - build-ios-test + - run: + name: Get iOS code coverage + command: | + platform/ios/scripts/code-coverage.sh - check-public-symbols - run: name: Check symbol namespacing for mapbox-events-ios diff --git a/platform/ios/scripts/code-coverage.sh b/platform/ios/scripts/code-coverage.sh index f9d67ffe88..1b353d1940 100755 --- a/platform/ios/scripts/code-coverage.sh +++ b/platform/ios/scripts/code-coverage.sh @@ -25,15 +25,22 @@ cov=$(printf "%.2f" $(echo "$percentage*100" | bc -l)) # # Create a formatted JSON file with the current coverage. # - +current_date=$(TZ=UTC date +"%Y-%m-%d") file_name=ios_coverage.json cat < $file_name - { "current-coverage" : $cov } + { "current_coverage" : $cov, + "platform" : "ios", + "sdk" : "maps", + "scheme" : "CI", + "created_at" : "$current_coverage" + } EOF gzip -f $file_name # # upload to AWS # -current_date=$(TZ=UTC date +"%Y-%m-%d") +if [ -z `which aws` ]; then + brew install awscli +fi aws s3 cp $file_name.gz s3://mapbox-loading-dock/raw/mobile.coverage/$current_date/ \ No newline at end of file -- cgit v1.2.1