-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): check that docs are up to date in ci
When we accidentally edit the auto-generated portions of the docs, this will catch the error and cause CI to fail. Later phase automated safety check that the early-stage human commenting in the last commit also addresses. Re: #3654 Re: #3630 PR-URL: #3655 Credit: @isaacs Close: #3655 Reviewed-by: @nlf
- Loading branch information
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env node | ||
const { spawnSync } = require('child_process') | ||
const changes = spawnSync('git', ['status', '--porcelain', '-uno']) | ||
const stdout = changes.stdout.toString('utf8') | ||
const stderr = changes.stderr.toString('utf8') | ||
const { status, signal } = changes | ||
console.log(stdout) | ||
console.error(stderr) | ||
if (status || signal) { | ||
console.error({ status, signal }) | ||
process.exitCode = status || 1 | ||
} | ||
if (stdout.trim() !== '') | ||
throw new Error('git dirty') | ||
else | ||
console.log('git clean') |