Skip to content

Commit 1a8d092

Browse files
Release 1.1.3
1 parent 0dd7f9b commit 1a8d092

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

dist/main/index.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14769,7 +14769,7 @@ const github = github_1.GithubService.create();
1476914769
function main() {
1477014770
var _a, _b;
1477114771
return __awaiter(this, void 0, void 0, function* () {
14772-
const initVersion = core.getInput('init-version') || '0.0.0';
14772+
const initVersion = core.getInput('init-version') || '0.1.0';
1477314773
const tagPrefix = core.getInput('tag-prefix') || 'v';
1477414774
core.debug(`main: input initVersion: ${initVersion}`);
1477514775
core.debug(`main: input tagPrefix: ${tagPrefix}`);
@@ -14850,6 +14850,9 @@ function createChangelog(messages) {
1485014850
return messages.map(message => message.split('\n')[0]);
1485114851
}
1485214852
function increaseVersionByMessages(version, messages) {
14853+
if (version.isIncreased()) {
14854+
return version;
14855+
}
1485314856
if (messages.findIndex(breakingChangeTest) >= 0) {
1485414857
return version.increaseMajor();
1485514858
}
@@ -14889,9 +14892,9 @@ class Version {
1488914892
this.version = version;
1489014893
this.increased = increased;
1489114894
}
14892-
static parse(version, initVersion = '0.0.0', prefix = 'v') {
14895+
static parse(version, initVersion = '0.1.0', prefix = 'v') {
1489314896
if (version === undefined) {
14894-
return new Version(new semver_1.SemVer(initVersion));
14897+
return new Version(new semver_1.SemVer(initVersion), true);
1489514898
}
1489614899
const versionWithoutPrefix = version.replace(prefix, '');
1489714900
return new Version(new semver_1.SemVer(versionWithoutPrefix));
@@ -14925,6 +14928,10 @@ class Version {
1492514928
return `${prefix}${version}`;
1492614929
}
1492714930
increase(type) {
14931+
// prevent double version increase
14932+
if (this.increased) {
14933+
return this;
14934+
}
1492814935
const version = new semver_1.SemVer(this.version.raw);
1492914936
version.inc(type);
1493014937
return new Version(version, true);

0 commit comments

Comments
 (0)