From cacf69253e641ac58e18927ff6cf4963c5b28f55 Mon Sep 17 00:00:00 2001 From: TJ Hoplock Date: Mon, 20 May 2024 14:52:05 -0400 Subject: [PATCH] build: add Makefile --- Makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a73f6eb --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +GOCMD := go +GOFMT := ${GOCMD} fmt +GOMOD := ${GOCMD} mod + +## help: print this help message +.PHONY: help +help: Makefile + # autogenerate help messages for comment lines with 2 `#` + @sed -n 's/^##//p' $< + +## tidy: tidy modules +tidy: + ${GOMOD} tidy + +## fmt: apply go code style formatter +fmt: + ${GOFMT} -x ./... + +## lint: run linters +lint: + golangci-lint run + nilaway ./... + +## binary: build a binary +binary: fmt tidy lint + goreleaser build --clean --single-target --snapshot --output . + +## build: alias for `binary` +build: binary