diff --git a/plugins/git-tag/src/index.ts b/plugins/git-tag/src/index.ts index 54d87ce7c..63afc9af6 100644 --- a/plugins/git-tag/src/index.ts +++ b/plugins/git-tag/src/index.ts @@ -44,16 +44,6 @@ export default class GitTagPlugin implements IPlugin { const lastTag = await getTag(); const newTag = inc(lastTag, bump as ReleaseType); - if (dryRun && newTag) { - if (quiet) { - console.log(newTag); - } else { - auto.logger.log.info(`Would have published: ${newTag}`); - } - - return; - } - if (!newTag) { auto.logger.log.info("No release found, doing nothing"); return; @@ -61,6 +51,16 @@ export default class GitTagPlugin implements IPlugin { const prefixedTag = auto.prefixRelease(newTag); + if (dryRun) { + if (quiet) { + console.log(prefixedTag); + } else { + auto.logger.log.info(`Would have published: ${prefixedTag}`); + } + + return; + } + auto.logger.log.info(`Tagging new tag: ${lastTag} => ${prefixedTag}`); await execPromise("git", [ "tag",