mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #66098 from apelisse/improve-verify-generated-docs
Automatic merge from submit-queue (batch tested with PRs 66098, 66389, 66400, 66413, 66378). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. verify-generated-docs: Use exit code rather than comparison to empty … …string Checking the exit code rather than the empty string has the advantage that you can identify what was found (comparison consumes the string, so it's not printed). It makes debugging much easier when something is wrong. One of my pull-request is failing saying that I need to run update, but it keeps saying that even after I ran update. And since I can't see what's wrong, it's quite hard to debug. **What this PR does / why we need it**: **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
af8292a0d6
@ -36,7 +36,7 @@ kube::util::ensure-temp-dir
|
||||
kube::util::gen-docs "${KUBE_TEMP}"
|
||||
|
||||
# Verify the list matches the expected list (diff should be empty)
|
||||
if [[ "$(diff ${KUBE_ROOT}/docs/.generated_docs ${KUBE_TEMP}/docs/.generated_docs)" != "" ]]; then
|
||||
if ! diff "${KUBE_ROOT}/docs/.generated_docs" "${KUBE_TEMP}/docs/.generated_docs"; then
|
||||
echo "List of generated docs doesn't match a freshly built list. Please run hack/update-generated-docs.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user