Skip to content

Instantly share code, notes, and snippets.

@hesenger
Last active December 16, 2023 17:40
Show Gist options
  • Save hesenger/78683b600cc90687ab0a953ccbd7d934 to your computer and use it in GitHub Desktop.
Save hesenger/78683b600cc90687ab0a953ccbd7d934 to your computer and use it in GitHub Desktop.
Basic Makefile for dotnet projects with build, run, test and code coverage calculation
# easily create the file with this gist content using the following curl command
# curl https://gist.githubusercontent.com/hesenger/78683b600cc90687ab0a953ccbd7d934/raw > Makefile
help:
@cat Makefile
build:
@dotnet build
run:
@dotnet watch run --project ./Web/Web.csproj
test:
@rm -rf ./TestResults
@dotnet test --collect:"XPlat Code Coverage" --results-directory:"./TestResults"
@reportgenerator -reports:./TestResults/**/coverage.cobertura.xml -targetdir:./TestResults/
@open ./TestResults/index.html
startdb:
@docker-compose up -d
stopdb:
@docker-compose stop
@hesenger
Copy link
Author

add comment with the curl command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment