summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2019-03-08 12:21:08 -0800
committerjmkiley <jordan.kiley@mapbox.com>2019-03-11 12:54:51 -0700
commit8cdc1a7a55e059b9fd8fcabd778940201445dea4 (patch)
tree50fdd5a0910bf2da7647ed00edcddc29483e3db4
parentde843e9361507b04b0aacab94d34a9bd97fb03c2 (diff)
downloadqtlocation-mapboxgl-8cdc1a7a55e059b9fd8fcabd778940201445dea4.tar.gz
[ios] rename file, clean up
-rwxr-xr-xplatform/ios/scripts/ios-code-coverage.sh (renamed from platform/ios/scripts/code-coverage.sh)0
-rwxr-xr-xscripts/code-coverage.sh26
2 files changed, 4 insertions, 22 deletions
diff --git a/platform/ios/scripts/code-coverage.sh b/platform/ios/scripts/ios-code-coverage.sh
index 8b8adb423a..8b8adb423a 100755
--- a/platform/ios/scripts/code-coverage.sh
+++ b/platform/ios/scripts/ios-code-coverage.sh
diff --git a/scripts/code-coverage.sh b/scripts/code-coverage.sh
index 7448df71fd..a2190b4949 100755
--- a/scripts/code-coverage.sh
+++ b/scripts/code-coverage.sh
@@ -3,40 +3,22 @@
set -e
set -o pipefail
-#
-# Check whether the script input values are valid.
-#
-# Check that platform is "ios" or "android".
+# Check that input values are valid.
+
if [[ ! $2 = "iOS" && ! $2 = "Android" ]]; then
echo "$2 does not match either 'iOS' or 'Android'. Platform must be specified for coverage report."
exit 1
fi
-#
-# Check whether a scheme was specified.
-#
-scheme=""
-if [ -z $3 ]; then
- echo "Scheme was not specified"
-else
- scheme=$3
-fi
-
+# Create a formatted JSON file that contains the current coverage.
-#
-# Create a formatted JSON file with the current coverage.
-#
current_date=$(TZ=UTC date +"%Y-%m-%d")
file_name=$2_coverage.json
cat <<EOF > $file_name
- {"code_coverage":$1,"platform":"$2","sdk":"Maps","scheme":"$scheme","created_at":"$current_date"}
+ {"code_coverage":$1,"platform":"$2","sdk":"Maps","scheme":"$3","created_at":"$current_date"}
EOF
-echo $file_name
gzip -f $file_name
-#
-# upload to AWS
-#
if [ -z `which aws` ]; then
brew install awscli
fi