Skip to content

Commit

Permalink
Add a Makefile to automatically generate config code. (#2014)
Browse files Browse the repository at this point in the history
Add a Makefile to automatically generate code.

Building using the Makefile will automatically trigger the code-generation and make sure that the developers don't forget generating and formatting the auto-generated code.
  • Loading branch information
kislaykishore committed Jul 1, 2024
1 parent 252d1a8 commit 0a3da66
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.DEFAULT_GOAL := build

.PHONY: generate fmt vet build buildTest install test clean clean-all

generate:
go generate ./...

fmt: generate
go fmt ./...

vet: fmt
go vet ./...

build: vet
go build .

buildTest: vet
go test -run=PATTERN_THAT_DOES_NOT_MATCH_ANYTHING ./...

install: fmt
go install -v ./...

test: fmt
CGO_ENABLED=0 go test -count 1 -v `go list ./... | grep -v internal/cache/...` && CGO_ENABLED=0 go test -p 1 -count 1 -v ./internal/cache/...

clean:
go clean

clean-all:
go clean -i ./...

0 comments on commit 0a3da66

Please sign in to comment.