summaryrefslogtreecommitdiff
path: root/scripts/code-coverage.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/code-coverage.sh')
-rwxr-xr-xscripts/code-coverage.sh26
1 files changed, 4 insertions, 22 deletions
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