From bbe014e334b552013384aa8150ab7ec5857f4acd Mon Sep 17 00:00:00 2001 From: Justin Harms Date: Sun, 21 Sep 2025 22:46:29 -0500 Subject: [PATCH] Refactor Makefile to streamline build and run commands - Updated the run command to execute the application from a built snapshot instead of using `go run`. - Added a new run-debug command for running the application with debug logging. - Consolidated the build process into a single target snapshot build command. - Enhanced help output to reflect the new command structure. --- Makefile | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 5e720a4..62631a5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,16 @@ -run: deps test ## Run the application - @go run . +run: build-snapshot-single ## Run the application + @dist/default_windows_amd64_v1/steamcache2.exe +run-debug: build-snapshot-single ## Run the application with debug logging + @dist/default_windows_amd64_v1/steamcache2.exe --log-level debug + +test: deps ## Run all tests + @go test -v ./... + +deps: ## Download dependencies + @go mod tidy + +build-snapshot-single: deps test ## Build a snapshot of the application for the current platform + @goreleaser build --single-target --snapshot --clean help: ## Show this help message @echo SteamCache2 Makefile @@ -7,13 +18,4 @@ help: ## Show this help message @echo run Run the application @echo run-debug Run the application with debug logging @echo test Run all tests - @echo deps Download dependencies - -run-debug: deps test ## Run the application with debug logging - @go run . --log-level debug - -test: deps ## Run all tests - @go test -v ./... - -deps: ## Download dependencies - @go mod tidy \ No newline at end of file + @echo deps Download dependencies \ No newline at end of file