Verify codegen use common funcs

This commit is contained in:
Chris Suszyński 2024-08-22 21:43:33 +02:00
parent efcb4ecfd0
commit 7804812bcc
No known key found for this signature in database
GPG Key ID: 97CCAEB0D718922B
2 changed files with 5 additions and 6 deletions

View File

@ -20,7 +20,7 @@ set -o pipefail
set -o errexit
set -o nounset
source_dirs="cmd pkg test lib tools"
source_dirs="cmd pkg test tools"
# Store for later
if [ -z "${1-}" ]; then

View File

@ -23,12 +23,11 @@ source "$(go run knative.dev/hack/cmd/script library.sh)"
"${REPO_ROOT_DIR}"/hack/build.sh --codegen
if output="$(git status --porcelain)" && [ -z "$output" ]; then
echo "${REPO_ROOT_DIR} is up to date."
subheader "${REPO_ROOT_DIR} is up to date."
else
echo "ERROR: Modified files found:"
error 'Modified files found:'
git status --porcelain
echo "ERROR: Diff"
error 'Diff'
git diff
echo "ERROR: ${REPO_ROOT_DIR} is out of date. Please run ./hack/build.sh -c and commit."
exit 1
abort "${REPO_ROOT_DIR} is out of date. Please run ./hack/build.sh -c and commit."
fi