Skip to content

Commit 4259782

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 4259782

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

build.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,17 @@ function get_protoc() {
8282
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"
8383
elif [[ "$os" == "linux" ]] ; then
8484
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"
85+
if [[ "$arch" == "x86_64" ]] ; then
86+
goarch="amd64"
87+
else
88+
goarch="$arch"
89+
fi
90+
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"
8691
else
8792
echo "Unsupported protoc platform : $os $arch"
8893
exit 1
8994
fi
90-
95+
set -x
9196
echo "Downloading protoc v$protoc_version..."
9297
curl -v -sSL "$protoc_url" -o protoc.zip
9398
mkdir -p "$versioned_cmd"

internal/mdx/metadata_exchange.pb.go

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

0 commit comments

Comments
 (0)