Skip to content

Commit

Permalink
Fix proto generation script on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
chadlwilson committed Aug 16, 2024
1 parent f488a84 commit 055e51b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions genproto.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ set_os_architecture() {
;;
esac

# gprc-tools is not available for MacOS arm64. Sigh.
if [ "$_ostype" == "macosx" ]; then
_cputype="x64"
fi

echo "OS is $_ostype"
echo "Architecture is $_cputype"
ARCH="$_cputype"
Expand All @@ -53,8 +58,8 @@ set_os_architecture
dotnet restore

grpc_tools_version="2.65.0"
protoc="$HOME"/.nuget/packages/build/grpc.tools/"$grpc_tools_version"/tools/"$OS"_"$ARCH"/protoc
grpc_csharp="$HOME"/.nuget/packages/build/grpc.tools/"$grpc_tools_version"/tools/"$OS"_"$ARCH"/grpc_csharp_plugin
protoc="$HOME"/.nuget/packages/grpc.tools/"$grpc_tools_version"/tools/"$OS"_"$ARCH"/protoc
grpc_csharp="$HOME"/.nuget/packages/grpc.tools/"$grpc_tools_version"/tools/"$OS"_"$ARCH"/grpc_csharp_plugin

chmod +x $protoc
chmod +x $grpc_csharp
Expand Down

0 comments on commit 055e51b

Please sign in to comment.