Skip to content

Commit 9cf0139

Browse files
aichbauerJPeer264
authored andcommitted
Fix: latest tagged commit to string (#4)
* Fix: latest tag to string, for getCommitRange from * Style: split latestTaggedCommit in latestTaggedCommits and latestTaggedCommit
1 parent 1a02c2c commit 9cf0139

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/cli.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import isAdded from 'is-git-added';
55
import isGit from 'is-git-repository';
66
import getGitRemotes from 'get-git-remotes';
77
import getCommitRange from 'git-commit-range';
8-
import taggedCommit from 'tagged-git-commit';
8+
import taggedCommits from 'tagged-git-commit';
99
import updateNotifier from 'update-notifier';
1010
import yargs from 'yargs';
1111

@@ -27,7 +27,8 @@ updateNotifier({ pkg }).notify();
2727

2828
const cli = () => {
2929
const cwd = process.cwd();
30-
const latestTaggedCommit = taggedCommit({ path: cwd });
30+
const latestTaggedCommits = taggedCommits({ path: cwd });
31+
const latestTaggedCommit = latestTaggedCommits.length === 0 ? '' : latestTaggedCommits[0];
3132
const commits = getCommitRange({ path: cwd, from: latestTaggedCommit });
3233
const latestVersion = getLatestVersion();
3334
const newVersions = generateVersions(latestVersion);

0 commit comments

Comments
 (0)