Created
April 7, 2017 05:18
-
-
Save T-Pham/3d595db25271a0fbaa8e5e4076158ac7 to your computer and use it in GitHub Desktop.
Export test coverage from slather to shield.io badge html object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slather coverage \ | |
--cobertura-xml \ | |
--scheme "SchemeName" \ | |
--workspace path/to/workspace \ | |
XcodeProjectName.xcodeproj | |
xmlstarlet sel \ | |
--template \ | |
--match "//coverage[1]" \ | |
--elem "object" \ | |
--attr "width" --output "120px" --break \ | |
--attr "height" --output "20px" --break \ | |
--attr "data" --output "https://img.shields.io/badge/test--coverage-" --value-of "round(@line-rate * 100)" --output "%-green.svg?style=flat-square" \ | |
cobertura.xml > test-coverage.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment