diff --git a/Makefile b/Makefile index dfc0b6f43..520d720ea 100644 --- a/Makefile +++ b/Makefile @@ -206,13 +206,17 @@ networkmonitor: | build deps librln ################### ## Documentation ## ################### -.PHONY: docs +.PHONY: docs coverage # TODO: Remove unused target docs: | build deps echo -e $(BUILD_MSG) "build/$@" && \ $(ENV_SCRIPT) nim doc --run --index:on --project --out:.gh-pages waku/waku.nim waku.nims +coverage: + echo -e $(BUILD_MSG) "build/$@" && \ + $(ENV_SCRIPT) ./scripts/run_cov.sh -y + ##################### ## Container image ## diff --git a/scripts/run_cov.sh b/scripts/run_cov.sh index 0c496c714..a95739f4e 100755 --- a/scripts/run_cov.sh +++ b/scripts/run_cov.sh @@ -22,7 +22,7 @@ SCRIPT_PATH=$(dirname "$(realpath -s "$0")") REPO_ROOT=$(dirname $SCRIPT_PATH) generated_not_to_break_here="$REPO_ROOT/generated_not_to_break_here" -if [ -f $generated_not_to_break_here ] +if [ "$1" != "-y" ] && [ -f "$generated_not_to_break_here" ] then echo "The file '$generated_not_to_break_here' already exists. Do you want to continue? (y/n)" read -r response