summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJordan Kiley <jmkiley@users.noreply.github.com>2019-03-18 17:53:15 -0700
committerGitHub <noreply@github.com>2019-03-18 17:53:15 -0700
commit41b25e2aa205a54b916ba987c9c0ae600204ebfd (patch)
treed1742305629000e6d7fda1c7ebd99efcea2ec469 /scripts
parentc2fe532b9bbc9db9b2bbab109f0f47f7cc9584d7 (diff)
downloadqtlocation-mapboxgl-41b25e2aa205a54b916ba987c9c0ae600204ebfd.tar.gz
[build] Add sha to the coverage json (#14145)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/code-coverage.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/code-coverage.sh b/scripts/code-coverage.sh
index d6866f61b8..c58501605d 100755
--- a/scripts/code-coverage.sh
+++ b/scripts/code-coverage.sh
@@ -17,12 +17,16 @@ if [[ ! $2 = "iOS" && ! $2 = "Android" ]]; then
exit 1
fi
+circle_sha=""
+if [[ $CIRCLE_SHA1 ]]; then
+ circle_sha="$CIRCLE_SHA1"
+fi
# Create a formatted JSON file that contains the current coverage.
-current_date=$(TZ=UTC date +"%Y-%m-%d")
+current_date=$(TZ=UTC date +"%F-%T")
file_name=$2_coverage.json
cat <<EOF > $file_name
- {"code_coverage":$1,"platform":"$2","sdk":"Maps","scheme":"$3","created_at":"$current_date"}
+ {"code_coverage":$1,"platform":"$2","sdk":"Maps","scheme":"$3","created_at":"$current_date","sha":"$circle_sha"}
EOF
gzip -f $file_name