refactor: protobuf make targets for v0.50#51
Conversation
|
| GRPC_GATEWAY_PROTOC_GEN_OPENAPIV2_VERSION=2.20.0 | ||
|
|
||
| proto-deps: | ||
| @echo "Installing proto deps" |
There was a problem hiding this comment.
Let's bring this back and not use proto builder. It can be a blocker if ICL doesn't maintain it well. Depending on the tools directly should be fine.
There was a problem hiding this comment.
I reverted to use raw tooling instead of docker image here 119d6d8
I had to add protoc-gen-gocosmos to list of deps and a few other tweaks to get things working, but seems good now
There was a problem hiding this comment.
Any reason for the changes in this file actually?
There was a problem hiding this comment.
was just quickest to get things working by using docker image
There was a problem hiding this comment.
but what was there should have been working, this is how I generated the protos when we started to upgrade from 0.46. What wasn't working 🤔
There was a problem hiding this comment.
I think proto-gen was failing due to me not having protoc-gen-gocosmos iirc, plus linting was complaining with something else - that's when I decided to take a look at things. Happy to use the tooling directly tho, things are good now
| @echo "--> Linting Protobuf files" | ||
| #? proto-format: Format Protobuf files | ||
| proto-format: | ||
| @find ./ -name "*.proto" -exec clang-format -i {} \; |
There was a problem hiding this comment.
should we add to makefile? :D
install-clang-format:
@echo "Detecting OS..."
@if [ "$(shell uname)" = "Darwin" ]; then \
echo "Installing clang-format on macOS..."; \
brew install clang-format; \
elif [ "$(shell uname)" = "Linux" ]; then \
echo "Installing clang-format on Linux..."; \
sudo apt-get update && sudo apt-get install -y clang-format || \
sudo yum install -y clang-tools-extra || \
sudo dnf install -y clang-tools-extra;
There was a problem hiding this comment.
I guess we can 😅 , bit ugly but if it's required. Might be nice to have one script that does platform based installation for all the tooling that's required. golanglint-ci, markdownlint, clang-format etc. But if this works out for now that's okay.
There was a problem hiding this comment.
Yeah, I mean, we can also just do without it for the time being and add one for all tooling if needs be. It's pretty obvious that you need to install it if its missing.
Diffs are mostly formatting to proto files