Skip to content

Commit

Permalink
Merge pull request GoogleCloudPlatform#2339 from maqiuyujoyce/202407-…
Browse files Browse the repository at this point in the history
…make-manifests

Ensure files in PR snapshot matches 'make ready-pr' result
  • Loading branch information
google-oss-prow[bot] authored Jul 24, 2024
2 parents 5c33d73 + ccd5807 commit 47f552f
Show file tree
Hide file tree
Showing 11 changed files with 366 additions and 14 deletions.

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

0 comments on commit 47f552f

Please sign in to comment.