aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/templates/index.html.template2
-rw-r--r--public/templates/sh.template (renamed from public/templates/bash.template)20
2 files changed, 11 insertions, 11 deletions
diff --git a/public/templates/index.html.template b/public/templates/index.html.template
index 4fb8930..2494e59 100644
--- a/public/templates/index.html.template
+++ b/public/templates/index.html.template
@@ -24,7 +24,7 @@
<p>If you have a coverage token, uploading a report is as easy as adding this line to your CI pipeline:</p>
<div class="code-container-container">
<div class="code-container">
- <span class="shell code">bash &lt;(curl -s {{TARGET_URL}}/bash)</span>
+ <span class="shell code">curl --proto '=https' --tlsv1.2 -sSf {{TARGET_URL}}/sh | sh</span>
</div>
</div>
<p>Visit <a href="https://git.submelon.dev/kjhoerr/ao-coverage/wiki/Home" target="_blank">the AO Coverage
diff --git a/public/templates/bash.template b/public/templates/sh.template
index 375143e..0e8e34c 100644
--- a/public/templates/bash.template
+++ b/public/templates/sh.template
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
# Licensed under Parity Public License 7.0.0
# The full version of this license can be found here:
@@ -15,13 +15,13 @@ curl_verbosity=""
content_type="text/html"
extension="html"
-function verbose_say() {
- if [ -z "$SILENT" ] && [ "$VERBOSE" == "true" ]; then
+verbose_say() {
+ if [ -z "$SILENT" ] && [ "$VERBOSE" = "true" ]; then
echo "$1"
fi
}
-function say() {
+say() {
if [ -z "$SILENT" ]; then
echo "$1"
fi
@@ -34,7 +34,7 @@ say
verbose_say "Gathering report information . . ."
-if [ "$CI" == "drone" ]; then
+if [ "$CI" = "drone" ]; then
verbose_say "Drone CI discovered - using Drone report info"
commit="$DRONE_COMMIT"
branch="$DRONE_BRANCH"
@@ -51,15 +51,15 @@ verbose_say "Using branch: $branch"
verbose_say "Using repo: $repo"
verbose_say
-if [ "$format" == "tarpaulin" ]; then
+if [ "$format" = "tarpaulin" ]; then
report="${REPORT_FILE:-tarpaulin-report.html}"
-elif [ "$format" == "cobertura" ]; then
+elif [ "$format" = "cobertura" ]; then
report="${REPORT_FILE:-cobertura.xml}"
content_type="application/xml"
extension="xml"
fi
-if [[ ! -f "$report" ]]; then
+if [ ! -f "$report" ]; then
say "Report file could not be found."
exit 1
fi
@@ -75,7 +75,7 @@ response=$(curl -X POST --data-binary "@$report" \
$curl_verbosity \
"$url/v1/$repo/$branch/$commit.$extension?token=$token&format=$format")
-if [ ! -z "$response" ]; then
+if [ -n "$response" ]; then
say "Error uploading report: $response"
exit 1
else
@@ -87,4 +87,4 @@ else
say "Shorthand links are also available, as the latest commit of this branch."
say "View latest report for branch $branch: $url/v1/$repo/$branch.$extension"
say "View latest badge for branch $branch: $url/v1/$repo/$branch.svg"
-fi \ No newline at end of file
+fi