Skip to content

Commit

Permalink
final fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aranjans committed Jun 3, 2024
1 parent 77ac334 commit 5313711
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions scripts/install_protoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ source "$(dirname $0)/vet-common.sh"
PROTOC_VERSION="25.2"

# Function to download pre-built binaries for Linux with
# ARCH as $1, OS as $2, and WORKDIR as $3 arguments.
# ARCH as $1, OS as $2, and INSTALL_PATH as $3 arguments.
download_binary() {
# Check if protoc is already available
# Check if protoc is already available.
if command -v protoc &> /dev/null; then
if installed_version=$(protoc --version | cut -d' ' -f2 2>/dev/null); then
if [ "$installed_version" = "$PROTOC_VERSION" ]; then
echo "protoc version $PROTOC_VERSION is already installed."
return
else
echo "Existing protoc version ($installed_version) differs. Kindly make sure you have $PROTOC_VERSION installed."
exit 1
die "Existing protoc version ($installed_version) differs. Kindly make sure you have $PROTOC_VERSION installed."
fi
else
echo "Unable to determine installed protoc version. Starting the installation."
Expand Down
2 changes: 1 addition & 1 deletion scripts/vet-proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [[ "$1" = "-install" ]]; then
if [[ "${GITHUB_ACTIONS}" = "true" ]]; then
source ./scripts/install_protoc.sh "/home/runner/go"
else
die "run protoc installer https://github.com/grpc/grpc-go/scripts/install_protoc.sh."
die "run protoc installer https://github.com/grpc/grpc-go/scripts/install_protoc.sh"
fi
echo SUCCESS
exit 0
Expand Down

0 comments on commit 5313711

Please sign in to comment.