From 7804812bcc8e18b68b4958598fb84d5568c6ee4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20Suszy=C5=84ski?= Date: Thu, 22 Aug 2024 21:43:33 +0200 Subject: [PATCH] Verify codegen use common funcs --- hack/build.sh | 2 +- hack/verify-codegen.sh | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hack/build.sh b/hack/build.sh index 3f78a77e26..3ba585fce6 100755 --- a/hack/build.sh +++ b/hack/build.sh @@ -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 diff --git a/hack/verify-codegen.sh b/hack/verify-codegen.sh index a0a6777c49..79c1abcaa4 100755 --- a/hack/verify-codegen.sh +++ b/hack/verify-codegen.sh @@ -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