Skip to content

Commit 9a21a17

Browse files
authored
fix: only show test step for manual publish (#297)
1 parent 7102893 commit 9a21a17

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

bin/release-manager.js

+24-17
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@ const args = process.argv.slice(2).reduce((acc, a) => {
1616
return acc
1717
}, {})
1818

19-
const PUBLISH_STEPS = `
19+
/* eslint-disable max-len */
20+
const MANUAL_PUBLISH_STEPS = `
21+
1. Checkout the release branch and test
22+
23+
\`\`\`sh
24+
gh pr checkout <PR-NUMBER> --force
25+
npm ${args.lockfile ? 'ci' : 'update'}
26+
npm test
27+
gh pr checks <PR-NUMBER> -R {NWO} --watch
28+
\`\`\`
29+
2030
1. Publish workspaces
2131
2232
\`\`\`sh
@@ -28,38 +38,35 @@ const PUBLISH_STEPS = `
2838
\`\`\`sh
2939
npm publish <PUBLISH-FLAGS>
3040
\`\`\`
31-
`
3241
33-
/* eslint-disable max-len */
34-
const DEFAULT_RELEASE_PROCESS = `
35-
1. Checkout the release branch and test
42+
1. Merge release PR
3643
3744
\`\`\`sh
38-
gh pr checkout <PR-NUMBER> --force
39-
npm ${args.lockfile ? 'ci' : 'update'}
40-
npm test
41-
gh pr checks --watch
45+
gh pr merge <PR-NUMBER> -R {NWO} --rebase
46+
git checkout <BASE-BRANCH>
47+
git fetch
48+
git reset --hard origin/<BASE-BRANCH>
4249
\`\`\`
50+
`
4351

44-
${!args.publish ? PUBLISH_STEPS : ''}
45-
46-
1. Merge release PR ${args.publish ? `:rotating_light: Merging this will auto publish :rotating_light:` : ''}
52+
const AUTO_PUBLISH_STEPS = `
53+
1. Merge release PR :rotating_light: Merging this will auto publish :rotating_light:
4754
4855
\`\`\`sh
49-
gh pr merge --rebase
50-
git checkout <BASE-BRANCH>
51-
git fetch
52-
git reset --hard origin/<BASE-BRANCH>
56+
gh pr merge <PR-NUMBER> -R {NWO} --rebase
5357
\`\`\`
58+
`
5459

60+
const DEFAULT_RELEASE_PROCESS = (args.publish ? AUTO_PUBLISH_STEPS : MANUAL_PUBLISH_STEPS) + `
5561
1. Check For Release Tags
5662
5763
Release Please will run on the just pushed release commit and create GitHub releases and tags for each package.
5864
5965
\`\`\`
6066
gh run watch \`gh run list -R {NWO} -w release -b <BASE-BRANCH> -L 1 --json databaseId -q ".[0].databaseId"\`
6167
\`\`\`
62-
` /* eslint-enable max-len */
68+
`
69+
/* eslint-enable max-len */
6370

6471
const getReleaseProcess = async ({ owner, repo }) => {
6572
const RELEASE_LIST_ITEM = /^\d+\.\s/gm

0 commit comments

Comments
 (0)