Many changes
This commit is contained in:
@@ -4,15 +4,16 @@ BIN_DIR := ./bin
|
||||
BIN := $(BIN_DIR)/$(APP_NAME)
|
||||
CONFIG ?= config.yaml
|
||||
|
||||
.PHONY: help run dev generate-config build test fmt clean
|
||||
.PHONY: help run dev generate-config build test test-race fmt clean
|
||||
|
||||
help:
|
||||
@echo "Targets:"
|
||||
@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 build - Build Svelte UI and binary to $(BIN)"
|
||||
@echo " make test - Run all Go tests with timeout and shuffle"
|
||||
@echo " make test-race - Run all Go tests with race detector and timeout"
|
||||
@echo " make fmt - Format Go code"
|
||||
@echo " make clean - Remove built artifacts"
|
||||
|
||||
@@ -25,11 +26,15 @@ generate-config:
|
||||
go run $(CMD_DIR) generate-config > $(CONFIG)
|
||||
|
||||
build: clean
|
||||
npm --prefix ./web/ui run build
|
||||
mkdir -p $(BIN_DIR)
|
||||
go build -o $(BIN) $(CMD_DIR)
|
||||
|
||||
test:
|
||||
go test ./...
|
||||
go test -timeout 30s -shuffle=on ./...
|
||||
|
||||
test-race:
|
||||
go test -race -timeout 30s -shuffle=on ./...
|
||||
|
||||
fmt:
|
||||
go fmt ./...
|
||||
|
||||
Reference in New Issue
Block a user