From 4e23a7b3f42e404ead34fca6f76ce2c0b9132a66 Mon Sep 17 00:00:00 2001 From: Justin Harms Date: Sun, 31 May 2026 17:45:11 -0500 Subject: [PATCH] Updated Makefile to introduce new targets for development and configuration generation, replacing the run target with an alias for dev. Enhanced help output for clarity on available commands. --- Makefile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 528ad25..272a469 100644 --- a/Makefile +++ b/Makefile @@ -4,20 +4,27 @@ BIN_DIR := ./bin BIN := $(BIN_DIR)/$(APP_NAME) CONFIG ?= config.yaml -.PHONY: help run build test fmt clean +.PHONY: help run dev generate-config build test fmt clean help: @echo "Targets:" - @echo " make run - Run the server (CONFIG=$(CONFIG))" + @echo " make run - Alias for make dev" + @echo " make dev - Build and run server (CONFIG=$(CONFIG))" + @echo " make generate-config - Write default config to $(CONFIG)" @echo " make build - Build binary to $(BIN)" @echo " make test - Run all Go tests" @echo " make fmt - Format Go code" @echo " make clean - Remove built artifacts" -run: - go run $(CMD_DIR) server --config $(CONFIG) +run: dev -build: +dev: build + $(BIN) server --config $(CONFIG) + +generate-config: + go run $(CMD_DIR) generate-config > $(CONFIG) + +build: clean mkdir -p $(BIN_DIR) go build -o $(BIN) $(CMD_DIR)