diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6db3394 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +go.mod +go.sum diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f14e0e6 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +V4_SRC = $(shell find ./v4 -type f -name '*.go' -not -path "./v4/vendor/*") +V3_SRC = $(shell find ./v3 -type f -name '*.go') + +default: build + +build: checks + go install ./v3 + go install ./v4 + +checks: fmt-check + +fmt-check: + @test -z "$(shell gofmt -l $(V3_SRC) | tee /dev/stderr)" || echo "[WARN] Fix formatting issues in ./v3 with 'make fmt'" + @test -z "$(shell gofmt -l $(V4_SRC) | tee /dev/stderr)" || echo "[WARN] Fix formatting issues in ./v4 with 'make fmt'" + +.PHONY: build checks fmt-check