autorel 2.2.8-next.7 → 2.2.8-next.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +11 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -57,9 +57,6 @@ async function autorel(args) {
57
57
  if (args.dryRun) {
58
58
  output_1.default.warn('Running in dry-run mode. No changes will be made.');
59
59
  }
60
- if (prereleaseChannel && !args.useVersion) {
61
- output_1.default.log(`Using prerelease channel: ${color.bold(prereleaseChannel)}`);
62
- }
63
60
  const commitTypeMap = new Map(args.commitTypes.map((type) => [type.type, type]));
64
61
  // fetch latest tags
65
62
  git.gitFetchTags();
@@ -67,8 +64,17 @@ async function autorel(args) {
67
64
  const lastProdTag = git.getLastProdTag();
68
65
  output_1.default.log(`The last tag is: ${lastTag ? color.bold(lastTag) : color.grey('none')}`);
69
66
  output_1.default.log(`The last production tag is: ${lastProdTag ? color.bold(lastProdTag) : color.grey('none')}`);
70
- const commits = git.getCommitsSinceLastTag(lastTag);
71
- output_1.default.log(`Found ${color.bold(commits.length.toString())} commit(s) ${lastTag ? `since ${lastTag}` : 'in the repository'}.`);
67
+ if (prereleaseChannel && !args.useVersion) {
68
+ output_1.default.log(`Using prerelease channel: ${color.bold(prereleaseChannel)}`);
69
+ }
70
+ if (prereleaseChannel) {
71
+ output_1.default.log(`Fetching commits since ${lastTag || 'the beginning of the repository'}...`);
72
+ }
73
+ else {
74
+ output_1.default.log(`Fetching commits since ${lastProdTag || 'the beginning of the repository'}...`);
75
+ }
76
+ const commits = git.getCommitsSinceLastTag(prereleaseChannel ? lastTag : lastProdTag);
77
+ output_1.default.log(`Found ${color.bold(commits.length.toString())} commit(s).`);
72
78
  const parsedCommits = commits.map((commit) => convCom.parseConventionalCommit(commit.message, commit.hash))
73
79
  .filter((commit) => !!commit);
74
80
  const releaseType = convCom.determineReleaseType(parsedCommits, commitTypeMap);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autorel",
3
- "version": "2.2.8-next.7",
3
+ "version": "2.2.8-next.8",
4
4
  "description": "Automate semantic releases based on conventional commits. Similar to semantic-release but much simpler.",
5
5
  "license": "MIT",
6
6
  "author": "Marc H. Weiner <mhweiner234@gmail.com> (https://mhweiner.com)",