Skip to content

Commit c5b8889

Browse files
committed
diff is useful
1 parent 1525382 commit c5b8889

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ jobs:
2929
run: yarn format:check
3030

3131
- name: "`yarn gen-readme` changes committed?"
32-
run: yarn gen-readme --check
32+
run: |
33+
yarn gen-readme
34+
git diff --exit-code

genReadme.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -330,27 +330,14 @@ async function main(argv) {
330330
filepath: path.basename(readmePath),
331331
});
332332

333-
if (argv.check) {
334-
if (pendingReadme !== currentReadme) {
335-
throw new Error("Readme is outdated. Forgot to run `yarn gen-readme`?");
336-
}
337-
} else {
338-
await fs.writeFile(readmePath, pendingReadme);
339-
}
333+
await fs.writeFile(readmePath, pendingReadme);
340334
}
341335

342336
yargs(hideBin(process.argv))
343337
.command({
344338
command: "$0",
345339
describe: "Generate the README.md from docs/ folder",
346340
handler: main,
347-
builder: (yargs) => {
348-
return yargs.option("check", {
349-
type: "boolean",
350-
description:
351-
"Exits with 1 if the current README.md is out-of-date and should be regenerated.",
352-
});
353-
},
354341
})
355342
.usage("node $0 [args]")
356343
.help()

0 commit comments

Comments
 (0)