Last active
October 30, 2023 16:01
-
-
Save jerrythomas/2b9c998d74e2b0c545d458267379bf6b to your computer and use it in GitHub Desktop.
merge lcov.info from packages under a monorepo into a single one.
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
#!/bin/bash | |
files=`find ./ -name lcov.info` | |
args="" | |
for f in $files; do | |
prefix=`echo $f | sed -e s/coverage.lcov.info// | sed -e s#^\./##` | |
echo "fixing paths in $f" | |
sed -i.bak "s#^SF\:src#SF\:${prefix}src#g" $f | |
args="$args -a $f" | |
done | |
echo $args | xargs lcov -o lcov.info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment