#!/usr/bin/env bash set -o pipefail VERIFY=$(bazel run @io_bazel_rules_go//go mod verify) if [ "$VERIFY" != "all modules verified" ]; then echo "Go modules are not verified." exit 1 fi echo "Verification is complete. Running just update-go-repos and verifying go files still aren't dirty." just update-go-repos GO_CHANGED_FILES=$(git status --porcelain go.sum go.mod hack/deps/go.bzl) if [ -n "$GO_CHANGED_FILES" ]; then echo "The following are not clean:" echo "$GO_CHANGED_FILES" exit 1 fi