summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 17 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index f3be7c5..15b11eb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,8 @@
-redo: generate goimport vet
+all: toolkitConfig.pb.go goimports vet
+ @echo This GO code passes the compile checks
+
+toolkitConfig.pb.go: toolkitConfig.proto
+ make generate
generate: clean
go mod init
@@ -8,26 +12,21 @@ generate: clean
go-generate:
rm -f *.pb.go *.patch
-vet:
- @GO111MODULE=off go vet
-
-vet:
- @GO111MODULE=off go vet
- @echo this go library builds okay
-
-redomod: goimports
- rm -f go.*
- GO111MODULE= go mod init
- GO111MODULE= go mod tidy
-
goimports:
goimports -w *.go
-proto: toolkitConfig.pb.go
-
-toolkitConfig.pb.go: toolkitConfig.proto
- autogenpb --proto toolkitConfig.proto
+vet:
+ @GO111MODULE=off go vet
clean:
- rm -f go.* *.pb.go
+ rm -f *.pb.go *.patch
+ -rm -f go.*
go-mod-clean purge
+
+# 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 toolkitConfig.proto
+ make goimports vet