diff options
| author | Murilo Ijanc <[email protected]> | 2026-07-26 12:42:38 -0300 |
|---|---|---|
| committer | Murilo Ijanc <[email protected]> | 2026-07-26 13:10:34 -0300 |
| commit | a2b10fd494fb389e556e40134031eb86e56e11e7 (patch) | |
| tree | 08b6df8a06f2c7c15488b90d57a6d8286cd57a22 /Makefile | |
| download | csharp-0.1.0.tar.gz | |
Initial importv0.1.0
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2bdf654 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +DOTNET ?= dotnet +CONFIGURATION ?= Release +SOLUTION := Cepis.sln +LIBRARY := src/Cepis/Cepis.csproj +ARTIFACTS := artifacts + +.DEFAULT_GOAL := help +.PHONY: help test lint format build pack check clean + +help: + @echo 'Targets:' + @echo ' test run the suite against a local HTTP server' + @echo ' lint dotnet format --verify-no-changes + build -warnaserror (read-only)' + @echo ' format apply dotnet format (writes)' + @echo ' build build the solution in $(CONFIGURATION)' + @echo ' pack the NuGet package into $(ARTIFACTS)' + @echo ' check lint + test + build, in that order' + @echo ' clean remove build output' + @echo + @echo 'Override the configuration with e.g. make build CONFIGURATION=Debug' + +test: + $(DOTNET) test $(SOLUTION) -c $(CONFIGURATION) + +lint: + $(DOTNET) format $(SOLUTION) --verify-no-changes --severity warn + $(DOTNET) build $(SOLUTION) -c $(CONFIGURATION) -warnaserror + +format: + $(DOTNET) format $(SOLUTION) --severity warn + +build: + $(DOTNET) build $(SOLUTION) -c $(CONFIGURATION) + +pack: + $(DOTNET) pack $(LIBRARY) -c $(CONFIGURATION) -o $(ARTIFACTS) + +check: lint test build + +clean: + $(DOTNET) clean $(SOLUTION) -c $(CONFIGURATION) || true + rm -rf $(ARTIFACTS) + find . -type d \( -name bin -o -name obj \) -prune -exec rm -rf {} + |