summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2019-03-04 14:45:31 -0800
committerjmkiley <jordan.kiley@mapbox.com>2019-03-11 12:54:50 -0700
commitf72876c41e1e851fb8ed6778ac4b3837cfb30fbb (patch)
tree8c805e3b7fd8bf2789ba0a5d3fc7bf4af1710f71
parent49ce78d25ff7222b4f0aaa979db622464f21ddf0 (diff)
downloadqtlocation-mapboxgl-f72876c41e1e851fb8ed6778ac4b3837cfb30fbb.tar.gz
[ios] move to dated directory
-rwxr-xr-xplatform/ios/scripts/code-coverage.sh12
1 files 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 <<EOF > $file_name.json
+current_date=$(TZ=UTC date +"%Y-%m-%d")
+if [ ! -d "%Y-%m-%d"]; then
+ mkdir -p $current_date;
+fi
+
+cat <<EOF > $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