feat: initial plan
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
APP := pgtidy
|
||||
CMD := ./cmd/pgtidy
|
||||
DIST := dist
|
||||
|
||||
.PHONY: build test lint vet fmt clean
|
||||
|
||||
## build: compile binary for the current platform
|
||||
build:
|
||||
go build -trimpath -ldflags "-s -w -X main.version=$$(git describe --tags --abbrev=0 2>/dev/null || echo dev)" -o $(DIST)/$(APP) $(CMD)
|
||||
|
||||
## test: run tests (incl. corpus safety harness)
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
## vet: static analysis
|
||||
vet:
|
||||
go vet ./...
|
||||
|
||||
## fmt: format Go code
|
||||
fmt:
|
||||
go fmt ./...
|
||||
|
||||
## lint: vet + format check
|
||||
lint: vet
|
||||
test -z "$$(gofmt -l .)" || (echo "gofmt needed:"; gofmt -l .; exit 1)
|
||||
|
||||
## clean: remove build artifacts
|
||||
clean:
|
||||
rm -rf $(DIST)
|
||||
Reference in New Issue
Block a user