Skip to content

Commit

Permalink
Verify codegen use common funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Aug 22, 2024
1 parent efcb4ec commit 7804812
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions hack/verify-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7804812

Please sign in to comment.