Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure files in PR snapshot matches 'make ready-pr' result #2339

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions pkg/clients/generated/apis/redis/v1alpha1/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions scripts/validate-prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,26 @@ if [[ "${changed_file_count}" != "0" ]]; then
fi
make manifests
changed_file_count=$(git diff --name-only | wc -l)
if [[ "${changed_file_count}" != "0" ]]; then
added_config_file_count=$(git ls-files --others --exclude-standard config/ | wc -l)
if [[ "${changed_file_count}" != "0" ]] || [[ "${added_config_file_count}" != "0" ]]; then
echo "Full diff:"
git diff
echo "ERROR: Manifests must be regenerated. Please run 'make ready-pr' or 'make manifests' and update your PR."
echo "Affected files:"
git diff --name-only
git ls-files --others --exclude-standard config/
exit 1
fi
make generate-go-client
changed_file_count=$(git diff --name-only | wc -l)
if [[ "${changed_file_count}" != "0" ]]; then
added_go_client_file_count=$(git ls-files --others --exclude-standard pkg/clients/generated/ | wc -l)
if [[ "${changed_file_count}" != "0" ]] || [[ "${added_go_client_file_count}" != "0" ]]; then
echo "Full diff:"
git diff
echo "ERROR: Resource Go Clients must be regenerated. Please run 'make ready-pr' or 'make generate-go-client' and update your PR."
echo "Affected files:"
git diff --name-only
git ls-files --others --exclude-standard pkg/clients/generated/
echo "First 100 lines of diff:"
git diff | head -n100
exit 1
Expand All @@ -75,11 +79,13 @@ if [[ "${changed_file_count}" != "0" ]]; then
fi
make resource-docs
changed_file_count=$(git diff --name-only | wc -l)
if [[ "${changed_file_count}" != "0" ]]; then
added_reference_doc_file_count=$(git ls-files --others --exclude-standard scripts/generate-google3-docs/resource-reference/generated/ | wc -l)
if [[ "${changed_file_count}" != "0" ]] || [[ "${added_reference_doc_file_count}" != "0" ]]; then
echo "Full diff:"
git diff
echo "ERROR: Resource docs must be regenerated. Please run 'make ready-pr' or 'make resource-docs' and update your PR."
echo "Affected files:"
git diff --name-only
git ls-files --others --exclude-standard scripts/generate-google3-docs/resource-reference/generated/
exit 1
fi
Loading