Parcourir la source

workflow: minor tweaks for release script (#10220)

- `pnpm run test` instead of `pnpm test run`
- also need `--no-git-checks` when drying run
- fix spelling of `remote`
Neo il y a 2 ans
Parent
commit
4082426c01
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      scripts/release.js

+ 3 - 3
scripts/release.js

@@ -114,7 +114,7 @@ async function main() {
   if (!(await isInSyncWithRemote())) {
   if (!(await isInSyncWithRemote())) {
     return
     return
   } else {
   } else {
-    console.log(`${pico.green(`✓`)} commit is up-to-date with rmeote.\n`)
+    console.log(`${pico.green(`✓`)} commit is up-to-date with remote.\n`)
   }
   }
 
 
   let targetVersion = args._[0]
   let targetVersion = args._[0]
@@ -239,7 +239,7 @@ async function main() {
   if (!skipTests) {
   if (!skipTests) {
     step('\nRunning tests...')
     step('\nRunning tests...')
     if (!isDryRun) {
     if (!isDryRun) {
-      await run('pnpm', ['test', 'run'])
+      await run('pnpm', ['run', 'test'])
     } else {
     } else {
       console.log(`Skipped (dry run)`)
       console.log(`Skipped (dry run)`)
     }
     }
@@ -307,7 +307,7 @@ async function main() {
   if (isDryRun) {
   if (isDryRun) {
     additionalPublishFlags.push('--dry-run')
     additionalPublishFlags.push('--dry-run')
   }
   }
-  if (skipGit) {
+  if (isDryRun || skipGit) {
     additionalPublishFlags.push('--no-git-checks')
     additionalPublishFlags.push('--no-git-checks')
   }
   }
   // bypass the pnpm --publish-branch restriction which isn't too useful to us
   // bypass the pnpm --publish-branch restriction which isn't too useful to us