Skip to content

Commit f283230

Browse files
committed
Fix initial --snapshot latestVersion
1 parent d4cc7a8 commit f283230

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ const runTasks = async (opts, di) => {
7070
const incrementBase = { latestVersion, increment, isPreRelease, preReleaseId };
7171

7272
const { snapshot } = config.options;
73-
if (snapshot && !incrementBase.latestVersion.startsWith('0.0.0')) {
73+
if (snapshot && (!incrementBase.latestVersion.startsWith('0.0.0') || incrementBase.latestVersion === '0.0.0')) {
7474
// Reading the latest version first allows to increment the final counter, fake it if it's not a snapshot:
75-
incrementBase.latestVersion = `0.0.0-${snapshot}.-1`;
75+
incrementBase.latestVersion = `0.0.0-0`;
7676
}
7777

7878
let version;

0 commit comments

Comments
 (0)