VOL-1460 Implemented a new approach to protos where go stubs are not committed to the repo.
There are new instructions for clients consuming these protos in Go.
Also removed vendor directory and dep, as it isn't really needed at this point.
Implemented a test to check if protos match up with go files. This is run with make test.
This works by generating them and checking this created any more untracked or unstaged changes.
It requires you to commit your changes locally to pass. This process to should be run by
jenkins to validate a commit. A consistent version of protoc must be used, which the Makefile checks for.
Change-Id: I8de28c515a9535e33909cbbd158fa046f96f3b1f
diff --git a/Makefile b/Makefile
index 16a495e..1825bae 100644
--- a/Makefile
+++ b/Makefile
@@ -80,9 +80,9 @@
# Go targets
go-protos:
-ifeq (, $(shell which protoc))
+ifeq ("", "$(shell which protoc)")
@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
- @echo "It looks like you don't have protocol buffer tools installed."
+ @echo "It looks like you don't have a version of protocol buffer tools."
@echo "To install the protocol buffer toolchain, you can run:"
@echo " make install-protoc"
@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
@@ -91,7 +91,15 @@
./build_go_protos.sh protos
go-test:
- echo "FIXME: Add golang tests"
+ifneq ("libprotoc 3.7.0", "$(shell protoc --version)")
+ @echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+ @echo "It looks like you don't have protocol buffer tools ${PROTOC_VERSION} installed."
+>---@echo "To install this version, you can run:"
+ @echo " make install-protoc"
+ @echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+ false
+endif
+ test/test-go-proto-consistency.sh
go-clean:
echo "FIXME: Add golang cleanup"
@@ -109,5 +117,5 @@
cd $(PROTOC_DIR); \
./configure --prefix=$(PROTOC_PREFIX); \
make; \
- sudo make install
-
+ sudo make install; \
+ sudo ldconfig