Skip to content

Commit 96c6423

Browse files
committed
[releng] Update check-changelog.js
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
1 parent 675e241 commit 96c6423

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

scripts/check-changelog.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2023, 2024 Obeo.
2+
* Copyright (c) 2023, 2025 Obeo.
33
* This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -26,7 +26,6 @@ const lines = result.split(/\r?\n/);
2626

2727
console.log("The following commits will be reviewed:");
2828
console.log(lines);
29-
console.log();
3029

3130
const changelog = fs.readFileSync(`${workspace}/CHANGELOG.adoc`, {
3231
encoding: "utf8",
@@ -39,16 +38,25 @@ const latestTag = childProcess.execSync("git describe --tags --abbrev=0", {
3938
// Get the next release version based on the latest tag
4039
const regexpCoordinates = /v(\d{4})\.(\d{1,2})\..*/g;
4140
const match = regexpCoordinates.exec(latestTag);
41+
console.log(`The latest tag is ${match}`);
42+
4243
let yearReleaseVersion = Number(match[1]);
4344
let majorReleaseVersion = Number(match[2]);
4445
if (majorReleaseVersion === 11) {
4546
yearReleaseVersion++;
4647
}
47-
majorReleaseVersion = (majorReleaseVersion + 2) % 12;
48+
49+
if (majorReleaseVersion === 10) {
50+
majorReleaseVersion = 12;
51+
} else {
52+
majorReleaseVersion = (majorReleaseVersion + 2) % 12;
53+
}
4854
if (majorReleaseVersion === 3) {
4955
majorReleaseVersion--;
5056
}
5157
const nextReleaseVersion = yearReleaseVersion + "." + majorReleaseVersion;
58+
console.log(`The next release version is ${nextReleaseVersion}.0`);
59+
5260
const releaseNotesPath = `doc/content/modules/user-manual/pages/release-notes/${nextReleaseVersion}.0.adoc`;
5361
const releaseNotes = fs.readFileSync(`${workspace}/${releaseNotesPath}`);
5462

0 commit comments

Comments
 (0)