Skip to content

Commit

Permalink
early return
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Dec 8, 2018
1 parent 938f838 commit 0900758
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,42 +223,42 @@ export async function run(args: ArgsType) {
case 'shipit': {
const version = await getVersion(githubRelease, args);

if (version !== '') {
await makeChangelog(
args,
githubRelease,
log,
prefixRelease,
veryVerbose,
verbose
);
if (version === '') {
return;
}

if (isMonorepo) {
await execPromise(
`lerna publish --yes --force-publish=* ${version} -m '%v [skip ci]'`
);
} else {
await execPromise(
`npm version ${version} -m "Bump version to: %s [skip ci]"`
);
await execPromise('npm publish');
await execPromise(
'git push --follow-tags --set-upstream origin $branch'
);
}
await makeChangelog(
args,
githubRelease,
log,
prefixRelease,
veryVerbose,
verbose
);

await makeRelease(
args,
githubRelease,
log,
prefixRelease,
veryVerbose,
verbose
if (isMonorepo) {
await execPromise(
`lerna publish --yes --force-publish=* ${version} -m '%v [skip ci]'`
);
} else {
await execPromise(
`npm version ${version} -m "Bump version to: %s [skip ci]"`
);
await execPromise('npm publish');
await execPromise(
'git push --follow-tags --set-upstream origin $branch'
);

return;
}

await makeRelease(
args,
githubRelease,
log,
prefixRelease,
veryVerbose,
verbose
);

break;
}
// PR Interaction
Expand Down

0 comments on commit 0900758

Please sign in to comment.