Skip to content

Commit bffb6ab

Browse files
author
Charlike Mike Reagent
committed
fix: make it more dry
Signed-off-by: Charlike Mike Reagent <mameto2011@gmail.com>
1 parent fd175e5 commit bffb6ab

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/cli.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,15 @@ export default function releaseCli(pkg, argv) {
3535
})
3636
.then(() => release(argv))
3737
.then(async (result) => {
38-
if (!result.increment && !result.nextVersion) {
39-
console.log('Skipping `npm publish` stage...');
40-
return null;
41-
}
42-
4338
if (argv.dry) {
4439
console.log(JSON.stringify(result, null, 2));
4540
console.log(argv);
4641
return null;
4742
}
43+
if (!result.increment && !result.nextVersion) {
44+
console.log('Skipping `npm publish` stage...');
45+
return null;
46+
}
4847

4948
const token = argv.token || proc.env.NPM_TOKEN;
5049
if (!token) {
@@ -66,10 +65,10 @@ export default function releaseCli(pkg, argv) {
6665
const registry =
6766
argv.registry || proc.env.NPM_REGISTRY || defaultRegistry;
6867
const content = ded`//registry.npmjs.org/:_authToken=${token}
69-
sign-git-tag=false
70-
git-tag-version=false
71-
allow-same-version=false
72-
`;
68+
sign-git-tag=false
69+
git-tag-version=false
70+
allow-same-version=false
71+
`;
7372

7473
const opts = {
7574
cwd: argv.cwd,

0 commit comments

Comments
 (0)