Skip to content

Commit

Permalink
fix: only show log with verbose option
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Apr 15, 2024
1 parent 573dbcd commit 89f9fb1
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class ReleaseItPnpmPlugin extends Plugin {
"dry-run": options["dry-run"],
"ci": options.ci,
"preRelease": options.preRelease,
"verbose": options.verbose,
});
}

Expand Down Expand Up @@ -182,17 +183,21 @@ class ReleaseItPnpmPlugin extends Plugin {
});
webUrl = `https://${config.baseUrl}/${config.repo}/releases/new?title=${encodeURIComponent(String(config.name || config.to))}&body=${encodeURIComponent(String(md))}&tag=${encodeURIComponent(String(config.to))}&prerelease=${config.prerelease}`;

this.log.log(
cyan(config.from) +
dim(" -> ") +
blue(config.to) +
dim(` (${commits.length} commits)`),
);
this.log.log(dim("--------------"));
this.log.log();
this.log.log(md.replaceAll(" ", ""));
this.log.log();
this.log.log(dim("--------------"));
this.debug("release-it-pnpm:release", { config, md, commits });

if (this.options["verbose"]) {
this.log.log(
cyan(config.from) +
dim(" -> ") +
blue(config.to) +
dim(` (${commits.length} commits)`),
);
this.log.log(dim("--------------"));
this.log.log();
this.log.log(md.replaceAll(" ", ""));
this.log.log();
this.log.log(dim("--------------"));
}

const printWebUrl = () => {
this.log.log();
Expand Down

0 comments on commit 89f9fb1

Please sign in to comment.