Skip to content

Commit

Permalink
chore: More robust coverage badge generation. (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan committed Oct 25, 2023
1 parent 97112fd commit d664add
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion scripts/generate-coverage-badge.sh
Expand Up @@ -13,7 +13,10 @@ elif [ "$TOTAL_COVERAGE" -gt 0 ]; then
COLOR="#e05d44"
fi

cat << EOF > "${1:-.}/coverage.json"
COVERAGE_JSON_DIR=${1:-.}
mkdir -p "$COVERAGE_JSON_DIR"

cat << EOF > "${COVERAGE_JSON_DIR}/coverage.json"
{
"schemaVersion": 1,
"label": "coverage",
Expand Down
5 changes: 4 additions & 1 deletion template/scripts/generate-coverage-badge.sh
Expand Up @@ -13,7 +13,10 @@ elif [ "$TOTAL_COVERAGE" -gt 0 ]; then
COLOR="#e05d44"
fi

cat << EOF > "${1:-.}/coverage.json"
COVERAGE_JSON_DIR=${1:-.}
mkdir -p "$COVERAGE_JSON_DIR"

cat << EOF > "${COVERAGE_JSON_DIR}/coverage.json"
{
"schemaVersion": 1,
"label": "coverage",
Expand Down

0 comments on commit d664add

Please sign in to comment.