1#! /bin/bash
2set -e
3lcov --directory bin.v2 --capture --no-external --directory $(pwd) --output-file coverage.info > /dev/null 2>&1
4lcov --extract coverage.info $(pwd)'/boost/beast/*' --output-file coverage.info > /dev/null
5lcov --remove coverage.info $(pwd)'/boost/beast/_experimental/*' --output-file coverage.info > /dev/null
6lcov --list coverage.info
7# Codecov improperly detects project root in AzP, so we need to upload from beast git repo
8cd libs/beast
9curl -s https://codecov.io/bash -o codecov && bash ./codecov -X gcov -f ../../coverage.info -t $CODECOV_TOKEN
10