mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
14 lines
278 B
Bash
Executable File
14 lines
278 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -o errexit
|
|
set -o pipefail
|
|
|
|
echo "mode: set" > coverage.txt
|
|
cat profile.* \
|
|
| grep -v mode: \
|
|
| sort -r \
|
|
| awk '{if($1 != last) {print $0;last=$1}}' >> coverage.txt
|
|
rm -f profile.*
|
|
|
|
go tool cover -func coverage.txt | tail -n 1 | awk '{print $3}'
|