Skip to content

Commit

Permalink
build: add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhop committed May 20, 2024
1 parent 9d0fecb commit cacf692
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cacf692

Please sign in to comment.