From a2b10fd494fb389e556e40134031eb86e56e11e7 Mon Sep 17 00:00:00 2001 From: Murilo Ijanc Date: Sun, 26 Jul 2026 12:42:38 -0300 Subject: Initial import --- Makefile | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 {} + -- cgit v1.3