Skip to content

Commit 23f24e0

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 23f24e0

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

build.sh

Lines changed: 7 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"

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)