...

Text file src/edge-infra.dev/hack/verify/go-repo-targets.sh

Documentation: edge-infra.dev/hack/verify

     1#!/usr/bin/env bash
     2
     3set -o pipefail
     4
     5VERIFY=$(bazel run @io_bazel_rules_go//go mod verify)
     6if [ "$VERIFY" != "all modules verified" ]; then
     7  echo "Go modules are not verified."
     8  exit 1
     9fi
    10
    11echo "Verification is complete. Running just update-go-repos and verifying go files still aren't dirty."
    12just update-go-repos
    13
    14GO_CHANGED_FILES=$(git status --porcelain go.sum go.mod hack/deps/go.bzl)
    15if [ -n "$GO_CHANGED_FILES" ]; then
    16  echo "The following are not clean:"
    17  echo "$GO_CHANGED_FILES"
    18  exit 1
    19fi
    20

View as plain text