-
Notifications
You must be signed in to change notification settings - Fork 910
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
Use git status to check for changes to devsite #8448
Conversation
|
Size Report 1Affected ProductsNo changes between base commit (fa0ed08) and merge commit (7726a2d).Test Logs |
Size Analysis Report 1Affected ProductsNo changes between base commit (fa0ed08) and merge commit (7726a2d).Test Logs |
992208a
to
89eabf0
Compare
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.
LG, thanks for catching!
@@ -36,7 +36,12 @@ jobs: | |||
- name: Run doc generation | |||
run: yarn docgen:all | |||
- name: Check for changes in docs-devsite dir (fail if so) | |||
run: git diff --exit-code docs-devsite | |||
run: | | |||
if [[ -n "$(git status docs-devsite --porcelain)" ]]; then |
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.
What an odd name for a command line option.
The previous check did not account for untracked changes, which caused it to output false-positives in two cases.
docs-devsite/
was deleted in a previous commit on the PR.yarn docgen:all
will regenerate the deleted file, but since it was previously deleted, it will now be untracked, sogit diff --exit-code
will succeed.yarn docgen:all
generates a new file, but it doesn't exist in the PR, it will be untracked, sogit diff --exit-code
will succeed.We can fix this by instead exiting with code 1 if
git status
has any output, which will include any untracked changes.