Skip to content

Instantly share code, notes, and snippets.

@prongbang
Last active August 9, 2022 03:38
Show Gist options
  • Save prongbang/89cd83cbf5233274d673fa9ca1cd7e9c to your computer and use it in GitHub Desktop.
Save prongbang/89cd83cbf5233274d673fa9ca1cd7e9c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
escapedPath="$(echo `pwd` | sed 's/\//\\\//g')"
if grep flutter pubspec.yaml > /dev/null; then
if [ -d "coverage" ]; then
# combine line coverage info from package tests to a common file
if [ ! -d "$MELOS_ROOT_PATH/coverage" ]; then
mkdir "$MELOS_ROOT_PATH/coverage"
fi
sed "s/^SF:lib/SF:$escapedPath\/lib/g" coverage/lcov.info >> "$MELOS_ROOT_PATH/coverage/lcov.info"
rm -rf "coverage"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment