From f72876c41e1e851fb8ed6778ac4b3837cfb30fbb Mon Sep 17 00:00:00 2001 From: jmkiley Date: Mon, 4 Mar 2019 14:45:31 -0800 Subject: [ios] move to dated directory --- platform/ios/scripts/code-coverage.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/platform/ios/scripts/code-coverage.sh b/platform/ios/scripts/code-coverage.sh index f69830fb22..9a9cc90fd1 100755 --- a/platform/ios/scripts/code-coverage.sh +++ b/platform/ios/scripts/code-coverage.sh @@ -25,14 +25,18 @@ cov=$(printf "%.2f" $(echo "$percentage*100" | bc -l)) # # Create a formatted JSON file with the current coverage. # -file_name="ios-coverage-$(TZ=UTC date +"%Y-%m-%d-$CIRCLE_SHA1")" -cat < $file_name.json +current_date=$(TZ=UTC date +"%Y-%m-%d") +if [ ! -d "%Y-%m-%d"]; then + mkdir -p $current_date; +fi + +cat < $current_date/ios-coverage.json { "current-coverage" : $cov } EOF -gzip -f $file_name.json +gzip -f $current_date/ios-coverage.json # # upload to AWS # -aws s3 cp $file_name.json.gz s3://mapbox-loading-dock/raw/mobile.coverage/ \ No newline at end of file +aws s3 cp $current_date/ios-coverage.json.gz s3://mapbox-loading-dock/raw/mobile.coverage/ \ No newline at end of file -- cgit v1.2.1