Skip to content

Commit 5ab5a23

Browse files
committed
chore: Update build.sh protoc download so it works on linux.
The build.sh get_protoc command now will properly handle machine architecture for linux x86_64 machines.
1 parent ec05f0b commit 5ab5a23

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

build.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# Set SCRIPT_DIR to the current directory of this file.
1818
SCRIPT_DIR=$(cd -P "$(dirname "$0")" >/dev/null 2>&1 && pwd)
1919
SCRIPT_FILE="${SCRIPT_DIR}/$(basename "$0")"
20-
2120
##
2221
## Local Development
2322
##
@@ -82,12 +81,17 @@ function get_protoc() {
8281
protoc_go_url="https://github.com/protocolbuffers/protobuf-go/releases/download/v${proto_go_version}/protoc-gen-go.v${proto_go_version}.${os}.${arch}.tar.gz"
8382
elif [[ "$os" == "linux" ]] ; then
8483
protoc_url="https://github.com/protocolbuffers/protobuf/releases/download/v${protoc_version}/protoc-${protoc_version}-${os}-${arch}.zip"
85-
protoc_go_url="https://github.com/protocolbuffers/protobuf-go/releases/download/v${proto_go_version}/protoc-gen-go.v${proto_go_version}.${os}.${arch}.tar.gz"
84+
if [[ "$arch" == "x86_64" ]] ; then
85+
goarch="amd64"
86+
else
87+
goarch="$arch"
88+
fi
89+
protoc_go_url="https://github.com/protocolbuffers/protobuf-go/releases/download/v${proto_go_version}/protoc-gen-go.v${proto_go_version}.${os}.${goarch}.tar.gz"
8690
else
8791
echo "Unsupported protoc platform : $os $arch"
8892
exit 1
8993
fi
90-
94+
9195
echo "Downloading protoc v$protoc_version..."
9296
curl -v -sSL "$protoc_url" -o protoc.zip
9397
mkdir -p "$versioned_cmd"
@@ -234,6 +238,10 @@ function write_e2e_env(){
234238
val=$(gcloud secrets versions access latest --project "$TEST_PROJECT" --secret="$secret_name")
235239
echo "export $env_var_name='$val'"
236240
done
241+
242+
echo "export MYSQL_USER_IAM='$(whoami)'"
243+
echo "export POSTGRES_USER_IAM='$(whoami)@google.com'"
244+
237245
} > "$1"
238246

239247
}

internal/mdx/metadata_exchange.pb.go

Lines changed: 16 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)