From 8e383864ad23016368cc335db6df4c9995010f00 Mon Sep 17 00:00:00 2001 From: Lilith Song Date: Fri, 21 Apr 2023 12:31:34 -0400 Subject: [PATCH] Improve shortcut makefile --- Makefile | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index da2c582..e3b900c 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,16 @@ -build: debug release +build: restore debug release ## Compile for both debug and release builds -debug: - dotnet.exe restore -r win - dotnet.exe build --no-restore -c Debug - -release: - dotnet.exe restore -r win +release: restore ## Compile a release build dotnet.exe build --no-restore -c Release -commit: build - git add --all - git commit +debug: restore ## Compile a debug build + dotnet.exe build --no-restore -c Debug -push: commit - git push +restore: ## Restore and verify nuget packages, dependencies, and tools in preparation for a build + dotnet.exe restore -r win -.PHONY: build debug release commit push +# Follow any target line with two hashes and the description/helpline and `make help` will autogenerate for them +help: + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}' +.PHONY: restore debug release build help