Prechádzať zdrojové kódy

build: don't wait for changelog edits when `--skip-prompts` or `--canary` is specified (#7965)

Haoqun Jiang 3 rokov pred
rodič
commit
543d6dbc94
1 zmenil súbory, kde vykonal 9 pridanie a 7 odobranie
  1. 9 7
      scripts/release.js

+ 9 - 7
scripts/release.js

@@ -211,14 +211,16 @@ async function main() {
   await run(`pnpm`, ['run', 'changelog'])
   await run(`pnpm`, ['run', 'changelog'])
 
 
   // @ts-ignore
   // @ts-ignore
-  const { yes: changelogOk } = await prompt({
-    type: 'confirm',
-    name: 'yes',
-    message: `Changelog generated. Does it look good?`
-  })
+  if (!skipPrompts) {
+    const { yes: changelogOk } = await prompt({
+      type: 'confirm',
+      name: 'yes',
+      message: `Changelog generated. Does it look good?`
+    })
 
 
-  if (!changelogOk) {
-    return
+    if (!changelogOk) {
+      return
+    }
   }
   }
 
 
   // update pnpm-lock.yaml
   // update pnpm-lock.yaml