mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 18:33:19 +02:00
include envoy's proto specs into config.proto (#1817)
This commit is contained in:
parent
5b9d18bb8b
commit
19d78cb844
10 changed files with 599 additions and 920 deletions
|
@ -5,12 +5,34 @@ _dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
|||
_protoc_version="4.0.0-rc2"
|
||||
_protoc_version_filename="4.0.0-rc-2"
|
||||
_protoc_path="/tmp/pomerium-protoc/protoc-$_protoc_version"
|
||||
_protoc_3pp_path="/tmp/pomerium-protoc-3pp"
|
||||
_os="linux"
|
||||
if [ "$(uname -s)" == "Darwin" ]; then
|
||||
_os="osx"
|
||||
fi
|
||||
|
||||
mkdir -p "$_protoc_path"
|
||||
|
||||
# fetch_zip dir name url
|
||||
download() {
|
||||
local dst=$1/$2
|
||||
if [ -d $dst ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo downloading $2
|
||||
local archive=`mktemp`
|
||||
curl -L -o $archive $3
|
||||
mkdir -p $dst
|
||||
tar xzf $archive -C $dst --strip-components=1
|
||||
rm ${archive}
|
||||
}
|
||||
|
||||
download $_protoc_3pp_path protoc-gen-validate https://github.com/envoyproxy/protoc-gen-validate/tarball/v0.4.1
|
||||
download $_protoc_3pp_path data-plane-api https://github.com/envoyproxy/data-plane-api/tarball/main
|
||||
download $_protoc_3pp_path udpa https://github.com/cncf/udpa/tarball/cc1b757b3eddccaaaf0743cbb107742bb7e3ee4f
|
||||
download $_protoc_3pp_path googleapis https://github.com/googleapis/googleapis/tarball/82944da21578a53b74e547774cf62ed31a05b841
|
||||
|
||||
mkdir -p "$_protoc_path" "$_protoc_3pp_path"
|
||||
if [ ! -f "$_protoc_path/bin/protoc" ]; then
|
||||
echo "downloading protoc"
|
||||
curl -L \
|
||||
|
@ -19,7 +41,12 @@ if [ ! -f "$_protoc_path/bin/protoc" ]; then
|
|||
unzip -o -d "$_protoc_path" protoc.zip
|
||||
rm protoc.zip
|
||||
fi
|
||||
|
||||
exec "$_protoc_path/bin/protoc" \
|
||||
-I "$_protoc_3pp_path/data-plane-api" \
|
||||
-I "$_protoc_3pp_path/udpa" \
|
||||
-I "$_protoc_3pp_path/protoc-gen-validate" \
|
||||
-I "$_protoc_3pp_path/googleapis" \
|
||||
--experimental_allow_proto3_optional \
|
||||
--plugin="protoc-gen-go=$_dir/protoc-gen-go" \
|
||||
--plugin="protoc-gen-grpc-web=$_dir/protoc-gen-grpc-web" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue