#!/usr/bin/env bash set -eu -o pipefail rm -rf vendor/ # Prevent the data directory from being pruned; this directory does not contain # go source files (causing vndr to prune it), however these files are used by # golang.org/x/net/publicsuffix through go:embed. vndr -whitelist golang.org/x/net/publicsuffix/data |& grep -v -i clone DIFF_PATH="vendor/" DIFF=$(git status --porcelain -- "$DIFF_PATH") if [ "$DIFF" ]; then echo echo "These files were modified:" echo echo "$DIFF" echo exit 1 else echo "$DIFF_PATH is correct" fi