summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile58
1 files changed, 19 insertions, 39 deletions
diff --git a/Makefile b/Makefile
index ada11ab..eb0cbc2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,19 @@
-# You must use the current google protoc-gen-go
-#
-# cd ~/go/src/google.golang.org/protobuf/cmd/protoc-gen-go
-# go install
+all: droplet.pb.go goimports vet
+ @echo This GO code passes the compile checks
-all: generate goimports vet
+# 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 droplet.proto
+ autogenpb --renumber --proto hypervisor.proto
+ make goimports vet
+
+# Moisey came up with the term 'droplet'
+# It's worked well as unique term for virtual machine
+droplet.pb.go: droplet.proto
+ make generate
generate: clean
go mod init
@@ -13,43 +23,13 @@ generate: clean
go-generate:
rm -f *.pb.go *.patch
-vet:
- @GO111MODULE=off go vet
- @echo this go library package builds okay
-
-# autofixes your import headers in your golang files
goimports:
goimports -w *.go
-redomod:
- rm -f go.*
- GO111MODULE= go mod init
- GO111MODULE= go mod tidy
+vet:
+ @GO111MODULE=off go vet
clean:
- rm -f *.pb.go
+ rm -f *.pb.go *.patch
-rm -f go.*
-
-proto:droplet.pb.go hypervisor.pb.go event.pb.go cluster.pb.go
-
-droplet.pb.go: droplet.proto
- autogenpb --proto droplet.proto
-
-hypervisor.pb.go: hypervisor.proto
- autogenpb --proto hypervisor.proto
-
-event.pb.go: event.proto
- autogenpb --proto event.proto
-
-cluster.pb.go: cluster.proto
- autogenpb --proto cluster.proto
-
-deps:
- apt install golang-goprotobuf-dev
- apt install protobuf-compiler
-
-push:
- git pull
- git add --all
- git commit -a -s
- git push
+ go-mod-clean purge