From 61d069ed565fe1b1731265cc79e360b7954d70f1 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 9 Oct 2025 01:03:48 -0500 Subject: common protobuf makefile --- Makefile | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index a0f2efc..620d0d8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,16 @@ -all: goimports vet +all: bug.pb.go goimports vet + @echo This GO code passes the compile checks + +# fixes your numbers if you move things around +# THIS TOTALLY BREAKS THE POINT OF PROTOBUF +# To work around that breaking, you must change the version +# also, all the wrapping code must support this. which it doesn't +proto-renumber: clean + autogenpb --renumber --proto bug.proto + make goimports vet + +bug.pb.go: bug.proto + make generate generate: clean go mod init @@ -6,19 +18,15 @@ generate: clean go generate go-generate: - rm -f *.pb.go - -vet: - @GO111MODULE=off go vet - @echo this go library builds okay + rm -f *.pb.go *.patch goimports: goimports -w *.go -proto: bug.pb.go - -bug.pb.go: bug.proto - autogenpb --proto bug.proto +vet: + @GO111MODULE=off go vet clean: - rm -f go.* *.pb.go + rm -f *.pb.go *.patch + -rm -f go.* + go-mod-clean purge -- cgit v1.2.3