diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2021-09-17 12:25:32 -0400 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2021-09-17 12:25:32 -0400 |
| commit | cca92e4ba601b4a738807224b4abe53228bab1a0 (patch) | |
| tree | ad34fcdacbe981b6c7b35ba9fb1717242edfeef5 /public/templates/bash.template | |
| parent | e33d446ee8457f8ae114e33210382668efba92a9 (diff) | |
| download | ao-coverage-cca92e4ba601b4a738807224b4abe53228bab1a0.tar.gz ao-coverage-cca92e4ba601b4a738807224b4abe53228bab1a0.tar.bz2 ao-coverage-cca92e4ba601b4a738807224b4abe53228bab1a0.zip | |
#14 Changed /bash file to /sh
Diffstat (limited to 'public/templates/bash.template')
| -rw-r--r-- | public/templates/bash.template | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/public/templates/bash.template b/public/templates/bash.template deleted file mode 100644 index 375143e..0000000 --- a/public/templates/bash.template +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash - -# Licensed under Parity Public License 7.0.0 -# The full version of this license can be found here: -# https://git.submelon.dev/kjhoerr/ao-coverage/raw/branch/trunk/LICENSE.md - -url="{{TARGET_URL}}" -commit="" -branch="" -repo="" -format="tarpaulin" -report="" -token="$COV_TOKEN" -curl_verbosity="" -content_type="text/html" -extension="html" - -function verbose_say() { - if [ -z "$SILENT" ] && [ "$VERBOSE" == "true" ]; then - echo "$1" - fi -} - -function say() { - if [ -z "$SILENT" ]; then - echo "$1" - fi -} - -say "===========================" -say " ao-coverage " -say "===========================" -say - -verbose_say "Gathering report information . . ." - -if [ "$CI" == "drone" ]; then - verbose_say "Drone CI discovered - using Drone report info" - commit="$DRONE_COMMIT" - branch="$DRONE_BRANCH" - repo="$DRONE_REPO" -else - verbose_say "Using environment variables for report info" - commit="$VCS_COMMIT" - branch="$VCS_BRANCH" - repo="$VCS_REPO" -fi - -verbose_say "Using commit #: $commit" -verbose_say "Using branch: $branch" -verbose_say "Using repo: $repo" -verbose_say - -if [ "$format" == "tarpaulin" ]; then - report="${REPORT_FILE:-tarpaulin-report.html}" -elif [ "$format" == "cobertura" ]; then - report="${REPORT_FILE:-cobertura.xml}" - content_type="application/xml" - extension="xml" -fi - -if [[ ! -f "$report" ]]; then - say "Report file could not be found." - exit 1 -fi - -if [ "$VERBOSE" != "true" ]; then - curl_verbosity="-s" -fi - -say "Uploading $report . . ." - -response=$(curl -X POST --data-binary "@$report" \ - -H "Content-Type: $content_type" \ - $curl_verbosity \ - "$url/v1/$repo/$branch/$commit.$extension?token=$token&format=$format") - -if [ ! -z "$response" ]; then - say "Error uploading report: $response" - exit 1 -else - say "Successfully uploaded report!" - say - say "View uploaded report at: $url/v1/$repo/$branch/$commit.$extension" - say "View coverage badge at: $url/v1/$repo/$branch/$commit.svg" - say - 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 |
