summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn1c00o <n@nc0.fr>2023-02-05 14:03:57 +0100
committerNicolas <34602094+n1c00o@users.noreply.github.com>2023-02-06 22:35:54 +0100
commit03e0c597ad5f3539ad33976fe02c11a9e39f34d6 (patch)
tree2a239abb329f951f5fa668e9f0c1305ab2ff6c58
parentf2cbc55b1e06c54e8b69271bbf578f7cff1ba701 (diff)
Add protobuf scripts
-rwxr-xr-xtools/protobuf/compile.sh10
-rwxr-xr-xtools/protobuf/format.sh3
2 files changed, 13 insertions, 0 deletions
diff --git a/tools/protobuf/compile.sh b/tools/protobuf/compile.sh
new file mode 100755
index 0000000..f669fe0
--- /dev/null
+++ b/tools/protobuf/compile.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env sh
+DEPS=$(find api -type f -name "*.proto")
+protoc --proto_path=./ \
+ --proto_path=third_party/googleapis \
+ --proto_path=third_party/grpc-proto \
+ --go_out=. \
+ --go_opt=paths=source_relative \
+ --go-grpc_out=. \
+ --go-grpc_opt=paths=source_relative \
+ "$DEPS" \ No newline at end of file
diff --git a/tools/protobuf/format.sh b/tools/protobuf/format.sh
new file mode 100755
index 0000000..11c9164
--- /dev/null
+++ b/tools/protobuf/format.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+DEPS=$(find api -type f -name "*.proto")
+clang-format -i --sort-includes "$DEPS" \ No newline at end of file