Skip to content

Commit

Permalink
Adapt documentation scripts to latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
blochberger committed Aug 13, 2018
1 parent d103218 commit bbcb438
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tafelsalz

[![Build Status](https://travis-ci.org/blochberger/Tafelsalz.svg?branch=master)](https://travis-ci.org/blochberger/Tafelsalz) ![Coverage](https://blochberger.github.io/Tafelsalz/macos/coverage.svg) [![Documentation](https://blochberger.github.io/Tafelsalz/macos/public/badge.svg)](https://blochberger.github.io/Tafelsalz)
[![Build Status](https://travis-ci.org/blochberger/Tafelsalz.svg?branch=master)](https://travis-ci.org/blochberger/Tafelsalz) [![Coverage](https://blochberger.github.io/Tafelsalz/macos/coverage.svg)](https://blochberger.github.io/Tafelsalz/macos/coverage/index.html) [![Documentation](https://blochberger.github.io/Tafelsalz/macos/public/badge.svg)](https://blochberger.github.io/Tafelsalz)

The main idea of this project is to provide usable but safe cryptographic operations.

Expand Down
9 changes: 6 additions & 3 deletions build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ if [ ${RUN_TESTS} = true ]; then
clean\
test

xcov-core\
--source build/Logs/Test/*.xccoverage\
--output build/coverage.json
xcrun xccov view --json build/Logs/Test/*.xccovreport > build/coverage.json

COVERAGE=$(
python3 "extract_coverage.py" "${MODULE}.framework" < build/coverage.json
Expand All @@ -102,6 +100,11 @@ if [ ${RUN_TESTS} = true ]; then
--progress-bar\
--output "${OUTPUT_DIR}/macos/coverage.svg"\
"https://img.shields.io/badge/coverage-${COVERAGE}%25-${COLOR}.svg"

xcov\
--html_report\
--scheme "${MODULE}_macOS"\
--output_directory "${OUTPUT_DIR}/macos/coverage"
fi

# Commit results
Expand Down
2 changes: 1 addition & 1 deletion extract_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
j = json.load(sys.stdin)
for i in range(len(j["targets"])):
if j["targets"][i]["name"] == framework:
print("{0:.0f}".format(j["targets"][i]["coverage"] * 100))
print("{0:.0f}".format(j["targets"][i]["lineCoverage"] * 100))
exit(0)

exit(1)

0 comments on commit bbcb438

Please sign in to comment.