-
-
Notifications
You must be signed in to change notification settings - Fork 652
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
A convenience script for previewing docs changes. #20569
Conversation
build-support/preview_docs.sh
Outdated
if [[ $(git diff --stat) != '' ]]; then | ||
echo "Expected clean git state in the pantsbuild/pantsbuild.org repo" | ||
exit 1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git diff --exit-code
..? ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, done.
echo "Expected clean git state in the pantsbuild/pantsbuild.org repo" | ||
exit 1 | ||
fi | ||
git diff --stat --exit-code > /dev/null || (echo "Expected clean git state in the pantsbuild/pantsbuild.org repo" && exit 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, and there's --quiet
too, when the output is not of interest:
git diff --quiet
:p
No description provided.