Skip to content

Commit

Permalink
fix: do not create tags in dry-run mode for released to add to a channel
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Nov 27, 2019
1 parent aec96c7 commit 97748c5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions index.js
Expand Up @@ -106,9 +106,13 @@ async function run(context, plugins) {
const commits = await getCommits({...context, lastRelease, nextRelease});
nextRelease.notes = await plugins.generateNotes({...context, commits, lastRelease, nextRelease});

await tag(nextRelease.gitTag, nextRelease.gitHead, {cwd, env});
await push(options.repositoryUrl, {cwd, env});
logger.success(`Created tag ${nextRelease.gitTag}`);
if (options.dryRun) {
logger.warn(`Skip ${nextRelease.gitTag} tag creation in dry-run mode`);
} else {
await tag(nextRelease.gitTag, nextRelease.gitHead, {cwd, env});
await push(options.repositoryUrl, {cwd, env});
logger.success(`Created tag ${nextRelease.gitTag}`);
}

context.branch.tags.push({
version: nextRelease.version,
Expand Down

0 comments on commit 97748c5

Please sign in to comment.