mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-16 11:39:57 +00:00
23 lines
630 B
Bash
Executable File
23 lines
630 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
if ! which realpath >/dev/null 2>&1; then
|
|
echo realpath is not installed
|
|
echo run: brew install coreutils
|
|
exit 1
|
|
fi
|
|
|
|
old_pwd=$(pwd)
|
|
script_path=$(dirname "$(realpath "$0")")
|
|
cd "$script_path"
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.6
|
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.6.1
|
|
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.26.3
|
|
protoc -I ./ ./daemon.proto \
|
|
--go_out=../ \
|
|
--go-grpc_out=../ \
|
|
--grpc-gateway_out=../ \
|
|
--grpc-gateway_opt=generate_unbound_methods=true \
|
|
--experimental_allow_proto3_optional
|
|
cd "$old_pwd"
|