@@ -8,33 +8,39 @@ CONFIG_PKG="github.com/murex/gamekit-coffeemachine/settings"
88export CGO_ENABLED =0
99
1010.PHONY : default
11- default : build ;
11+ default : help # # Shows this help message (default target)
12+
13+ .PHONY : help
14+ help : # # Show this help message
15+ @echo " Available targets:"
16+ @grep -E ' ^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST ) | sort | awk ' BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
1217
1318# Convenience target for automating release preparation
1419.PHONY : prepare
15- prepare : deps tidy lint modernize build test
20+ prepare : deps tidy lint modernize build test # # Prepare for commit or release - runs deps, tidy, lint, modernize, build, test
1621
1722.PHONY : deps
18- deps :
23+ deps : # # Update all dependencies
1924 @go get -u -t tool ./...
2025
2126.PHONY : lint
22- lint :
27+ lint : # # Run linter (golangci-lint)
2328 @golangci-lint run -v
2429
2530.PHONY : modernize
26- modernize :
31+ modernize : # # Run go modernize utility
2732 @go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -test ./...
2833
2934.PHONY : vet
30- vet :
35+ vet : # # Run go vet
3136 @go vet ./...
3237
3338.PHONY : tidy
34- tidy :
39+ tidy : # # Tidy go modules
3540 @go mod tidy
3641
3742.PHONY : build
43+ build : # # Build all binaries (cli, progress-runner, gotestsum, test2json)
3844
3945cli_bin := bin/cli$(EXT )
4046build : $(cli_bin )
@@ -76,24 +82,23 @@ $(test2json_bin):
7682 @go build -o $@ -ldflags=" -s -w" cmd/test2json
7783
7884.PHONY : test
79- test :
85+ test : # # Run all tests
8086 @go tool gotestsum ./... -test.count=1
8187
8288.PHONY : clean
83- clean :
89+ clean : # # Clean build artifacts and test results
8490 @rm -rf bin
8591 @rm -rf dist
8692 @rm -rf _test_results
8793
88-
8994.PHONY : download
90- download :
95+ download : # # Download go modules
9196 @go mod download
9297
9398.PHONY : release
94- release :
99+ release : # # Create a release using goreleaser
95100 @go tool goreleaser $(GORELEASER_ARGS )
96101
97102.PHONY : snapshot
98- snapshot : GORELEASER_ARGS= --clean --snapshot
103+ snapshot : GORELEASER_ARGS= --clean --snapshot # # Create a snapshot release using goreleaser
99104snapshot : release
0 commit comments