chore: fix coverage badge
This commit is contained in:
parent
a433b4fc7a
commit
dc6da3cabb
2 changed files with 10 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="98" height="20">
|
||||
<rect width="59" height="20" fill="#555"/>
|
||||
<rect x="59" width="39" height="20" fill="#4c1"/>
|
||||
<text x="30" y="14" fill="#fff" font-family="Verdana" font-size="11">coverage</text>
|
||||
<text x="65" y="14" fill="#fff" font-family="Verdana" font-size="11">22.3%</text>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="110" height="20">
|
||||
<rect width="1100" height="20" fill="#555"/>
|
||||
<rect x="60" width="50" height="20" fill="#4c1"/>
|
||||
<text x="5" y="14" fill="#fff" font-family="Verdana" font-size="11">coverage</text>
|
||||
<text x="70" y="14" fill="#fff" font-family="Verdana" font-size="11">22.3%</text>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 339 B After Width: | Height: | Size: 341 B |
|
@ -1,10 +1,10 @@
|
|||
#!/bin/bash
|
||||
COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
|
||||
cat <<EOF > coverage-badge.svg
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="98" height="20">
|
||||
<rect width="59" height="20" fill="#555"/>
|
||||
<rect x="59" width="39" height="20" fill="#4c1"/>
|
||||
<text x="30" y="14" fill="#fff" font-family="Verdana" font-size="11">coverage</text>
|
||||
<text x="65" y="14" fill="#fff" font-family="Verdana" font-size="11">${COVERAGE}%</text>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="110" height="20">
|
||||
<rect width="1100" height="20" fill="#555"/>
|
||||
<rect x="60" width="50" height="20" fill="#4c1"/>
|
||||
<text x="5" y="14" fill="#fff" font-family="Verdana" font-size="11">coverage</text>
|
||||
<text x="70" y="14" fill="#fff" font-family="Verdana" font-size="11">${COVERAGE}%</text>
|
||||
</svg>
|
||||
EOF
|
Loading…
Reference in a new issue