File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change 29
29
run : yarn format:check
30
30
31
31
- name : " `yarn gen-readme` changes committed?"
32
- run : yarn gen-readme --check
32
+ run : |
33
+ yarn gen-readme
34
+ git diff --exit-code
Original file line number Diff line number Diff line change @@ -330,27 +330,14 @@ async function main(argv) {
330
330
filepath : path . basename ( readmePath ) ,
331
331
} ) ;
332
332
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 ) ;
340
334
}
341
335
342
336
yargs ( hideBin ( process . argv ) )
343
337
. command ( {
344
338
command : "$0" ,
345
339
describe : "Generate the README.md from docs/ folder" ,
346
340
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
- } ,
354
341
} )
355
342
. usage ( "node $0 [args]" )
356
343
. help ( )
You can’t perform that action at this time.
0 commit comments