Files
upstream-grpc-go/scripts/vet-proto.sh
upstream-mirror e241b33f26
Some checks failed
codecov / upload (push) Failing after 13m59s
CodeQL / Analyze (push) Failing after 1s
govulncheck / govulncheck (.) (push) Failing after 1s
govulncheck / govulncheck (./cmd/protoc-gen-go-grpc) (push) Failing after 1s
govulncheck / govulncheck (./gcp/observability) (push) Failing after 1s
govulncheck / govulncheck (./security/advancedtls) (push) Failing after 1s
govulncheck / govulncheck (./stats/opencensus) (push) Failing after 1s
Testing / vet-proto (push) Failing after 1s
Testing / tests (arm, latest) (push) Waiting to run
Testing / extras (latest) (push) Failing after 1s
Testing / static checks (latest-1) (push) Failing after 1s
Testing / tests (-race, latest) (push) Failing after 1s
Testing / tests (i386, latest) (push) Failing after 1s
Testing / tests (latest) (push) Failing after 1s
Testing / tests (latest-1) (push) Failing after 1s
Lock Threads / lock (push) Failing after 1s
Stale bot / stale (push) Failing after 1s
snapshot of https://github.com/grpc/grpc-go.git (master, 2026-09-15; blobs > 131072B omitted)
2026-09-15 20:40:15 +05:00

47 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
set -ex # Exit on error; debugging enabled.
set -o pipefail # Fail a pipe if any sub-command fails.
# - Source them sweet sweet helpers.
source "$(dirname $0)/common.sh"
# - Check to make sure it's safe to modify the user's git repo.
git status --porcelain | fail_on_output
# - Undo any edits made by this script.
cleanup() {
git reset --hard HEAD
}
trap cleanup EXIT
# - Installs protoc into your ${GOBIN} directory, if requested.
# ($GOBIN might not be the best place for the protoc binary, but is at least
# consistent with the place where all binaries installed by scripts in this repo
# go.)
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/blob/master/scripts/install-protoc.sh"
fi
echo SUCCESS
exit 0
elif [[ "$#" -ne 0 ]]; then
die "Unknown argument(s): $*"
fi
for MOD_FILE in $(find . -name 'go.mod'); do
MOD_DIR=$(dirname ${MOD_FILE})
pushd ${MOD_DIR}
go generate ./...
popd
done
# - Check that generated proto files are up to date.
git status --porcelain 2>&1 | fail_on_output || \
(git status; git --no-pager diff; exit 1)
echo SUCCESS
exit 0