Skip to content

Commit 25c6034

Browse files
tsvetomirgyoshev
authored andcommitted
feat: start official releases in the 0.x range
1 parent d86050a commit 25c6034

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@ This project has been tested in Travis-CI and Jenkins builds.
4646
With the above setup, new official releases (bearing the `latest` dist-tag) can be published from `master` by fast-forwarding it to `develop`:
4747

4848
git checkout master && git merge --ff-only develop && git push
49+
50+
> Your first official release will be published with version 0.1.0 to enable automatic releases during initial development. You must mark a commit as a [major release](https://github.com/semantic-release/semantic-release#major-breaking-release) to release bump the major version to 1. This is different than vanilla semantic-release where your first release is 1.0.0

verifyRelease.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ module.exports = function (pluginConfig, config, cb) {
66
const suffix = `-${config.npm.tag}.${timestamp}`;
77
const release = config.nextRelease;
88

9-
release.version = release.version.replace(/\-.+$/, suffix);
9+
if (release.type === 'initial') {
10+
// start releases with 0.1.0 instead of 1.0.0
11+
release.version = '0.1.0';
12+
} else {
13+
release.version = release.version.replace(/\-.+$/, suffix);
14+
}
1015

1116
console.log(`Ready for release v${release.version}`);
1217
}
1318

1419
cb(null);
1520
};
21+

0 commit comments

Comments
 (0)