From 502471ba865ca95cf70b44d8515a33ebdfca4c12 Mon Sep 17 00:00:00 2001 From: Axel RICHARD Date: Mon, 23 Dec 2024 10:20:42 +0100 Subject: [PATCH] [releng] Prepare next release Signed-off-by: Axel RICHARD --- .../pages/release-notes/2025.2.0.adoc | 23 +++++++ .../pages/release-notes/release-notes.adoc | 1 + doc/docs-site/antora-playbook.yml | 2 +- docker-compose.yml | 2 +- scripts/check-changelog.js | 69 ++++++++++--------- 5 files changed, 62 insertions(+), 35 deletions(-) create mode 100644 doc/content/modules/user-manual/pages/release-notes/2025.2.0.adoc diff --git a/doc/content/modules/user-manual/pages/release-notes/2025.2.0.adoc b/doc/content/modules/user-manual/pages/release-notes/2025.2.0.adoc new file mode 100644 index 000000000..261d9d11e --- /dev/null +++ b/doc/content/modules/user-manual/pages/release-notes/2025.2.0.adoc @@ -0,0 +1,23 @@ += 2025.2.0 (work in progress) + +== Key highlights + + +== Breaking changes + + +== Bug fixes + + +== New features + + +== Improvements + + +== Dependency update + + +== Technical details + +* For technical details on this {product} release please refer to https://github.com/eclipse-syson/syson/blob/main/CHANGELOG.adoc[changelog]. diff --git a/doc/content/modules/user-manual/pages/release-notes/release-notes.adoc b/doc/content/modules/user-manual/pages/release-notes/release-notes.adoc index 42ad2583e..ddc192c67 100644 --- a/doc/content/modules/user-manual/pages/release-notes/release-notes.adoc +++ b/doc/content/modules/user-manual/pages/release-notes/release-notes.adoc @@ -2,6 +2,7 @@ :sectnums!: +include::user-manual:release-notes/2025.2.0.adoc[leveloffset=+1] include::user-manual:release-notes/2025.1.0.adoc[leveloffset=+1] include::user-manual:release-notes/2024.11.0.adoc[leveloffset=+1] include::user-manual:release-notes/2024.9.0.adoc[leveloffset=+1] diff --git a/doc/docs-site/antora-playbook.yml b/doc/docs-site/antora-playbook.yml index a2018a9b2..491451c81 100644 --- a/doc/docs-site/antora-playbook.yml +++ b/doc/docs-site/antora-playbook.yml @@ -1,6 +1,6 @@ site: title: SysON Docs - start_page: v2024.11.0@syson::index.adoc + start_page: v2025.1.0@syson::index.adoc output: clean: true diff --git a/docker-compose.yml b/docker-compose.yml index c62545a66..568d974cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: networks: - syson app: - image: "${IMAGE_TAG:-eclipsesyson/syson:v2025.1.0}" + image: "${IMAGE_TAG:-eclipsesyson/syson:latest}" ports: - "8080:8080" environment: diff --git a/scripts/check-changelog.js b/scripts/check-changelog.js index 22ece7648..2c3a010e1 100644 --- a/scripts/check-changelog.js +++ b/scripts/check-changelog.js @@ -10,8 +10,8 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -const childProcess = require('child_process'); -const fs = require('fs'); +const childProcess = require("child_process"); +const fs = require("fs"); const workspace = process.env.GITHUB_WORKSPACE; const event = process.env.GITHUB_EVENT; @@ -21,19 +21,19 @@ const baseSHA = body.pull_request.base.sha; const headSHA = body.pull_request.head.sha; const gitLogCommand = `git log --format=format:%H ${baseSHA}..${headSHA}`; -const result = childProcess.execSync(gitLogCommand, { encoding: 'utf8' }); +const result = childProcess.execSync(gitLogCommand, { encoding: "utf8" }); const lines = result.split(/\r?\n/); -console.log('The following commits will be reviewed:'); +console.log("The following commits will be reviewed:"); console.log(lines); console.log(); const changelog = fs.readFileSync(`${workspace}/CHANGELOG.adoc`, { - encoding: 'utf8', + encoding: "utf8", }); -const latestTag = childProcess.execSync('git describe --tags --abbrev=0', { - encoding: 'utf8', +const latestTag = childProcess.execSync("git describe --tags --abbrev=0", { + encoding: "utf8", }); // Get the next release version based on the latest tag @@ -41,31 +41,34 @@ const regexpCoordinates = /v(\d{4})\.(\d{1,2})\..*/g; const match = regexpCoordinates.exec(latestTag); let yearReleaseVersion = Number(match[1]); let majorReleaseVersion = Number(match[2]); -if(majorReleaseVersion === 11) { +if (majorReleaseVersion === 11) { yearReleaseVersion++; } majorReleaseVersion = (majorReleaseVersion + 2) % 12; -const nextReleaseVersion = yearReleaseVersion + '.' + majorReleaseVersion -const docChangelogPath = `doc/content/modules/user-manual/pages/release-notes/${nextReleaseVersion}.0.adoc` -const docChangelog = fs.readFileSync(`${workspace}/${docChangelogPath}`); +if (majorReleaseVersion === 3) { + majorReleaseVersion--; +} +const nextReleaseVersion = yearReleaseVersion + "." + majorReleaseVersion; +const releaseNotesPath = `doc/content/modules/user-manual/pages/release-notes/${nextReleaseVersion}.0.adoc`; +const releaseNotes = fs.readFileSync(`${workspace}/${releaseNotesPath}`); const invalidChangelogContent = - changelog.includes('<<<<<<<') || - changelog.includes('=======') || - changelog.includes('>>>>>>>'); + changelog.includes("<<<<<<<") || + changelog.includes("=======") || + changelog.includes(">>>>>>>"); -const invalidDocChangelogContent = - docChangelog.includes('<<<<<<<') || - docChangelog.includes('=======') || - docChangelog.includes('>>>>>>>'); +const invalidReleaseNotesContent = + releaseNotes.includes("<<<<<<<") || + releaseNotes.includes("=======") || + releaseNotes.includes(">>>>>>>"); const missingIssuesInChangelog = []; -const missingIssuesInDocChangelog = []; +const missingIssuesInReleaseNotes = []; for (let index = 0; index < lines.length; index++) { const line = lines[index]; const gitShowCommand = `git rev-list --format=%B --max-count=1 ${line}`; const commitMessage = childProcess.execSync(gitShowCommand, { - encoding: 'utf8', + encoding: "utf8", }); const commitMessageLines = commitMessage.split(/\r?\n/); @@ -73,10 +76,10 @@ for (let index = 0; index < lines.length; index++) { // Skip the first line which only contains the hash of the commit const title = commitMessageLines[1]; - const tagStartIndex = title.indexOf('['); - const tagEndIndex = title.indexOf(']', tagStartIndex); + const tagStartIndex = title.indexOf("["); + const tagEndIndex = title.indexOf("]", tagStartIndex); if (tagStartIndex >= 0 && tagStartIndex < tagEndIndex) { - const tag = title.substring(tagStartIndex + '['.length, tagEndIndex); + const tag = title.substring(tagStartIndex + "[".length, tagEndIndex); const tagAsNumber = Number(tag); if (!isNaN(tagAsNumber)) { @@ -86,14 +89,14 @@ for (let index = 0; index < lines.length; index++) { missingIssuesInChangelog.push(issueURL); } - // Check that the documentation changelog has been updated in the commit + // Check that the release notes has been updated in the commit const gitDescribeCommand = `git diff-tree --no-commit-id --name-only ${line} -r`; const changedFiles = childProcess.execSync(gitDescribeCommand, { - encoding: 'utf8', + encoding: "utf8", }); const changedFilesLines = changedFiles.split(/\r?\n/); - if(!changedFilesLines.includes(docChangelogPath)) { - missingIssuesInDocChangelog.push(issueURL); + if (!changedFilesLines.includes(releaseNotesPath)) { + missingIssuesInReleaseNotes.push(issueURL); } } } @@ -102,24 +105,24 @@ for (let index = 0; index < lines.length; index++) { if (missingIssuesInChangelog.length > 0) { console.log( - 'The following issues should appear in the CHANGELOG with some documentation' + "The following issues should appear in the CHANGELOG with some documentation" ); console.log(missingIssuesInChangelog); process.exit(1); -} else if(missingIssuesInDocChangelog.length > 0) { +} else if (missingIssuesInReleaseNotes.length > 0) { console.log( - `The commits referencing the following issues should contain a modification of the latest documentation changelog (${docChangelogPath})` + `The commits referencing the following issues should contain a modification of the latest release notes (${releaseNotesPath})` ); - console.log(missingIssuesInDocChangelog); + console.log(missingIssuesInReleaseNotes); process.exit(1); } else if (invalidChangelogContent) { console.log( 'The CHANGELOG seems to contain Git conflict markers like "<<<<<<<", "=======" or ">>>>>>>"' ); process.exit(1); -} else if(invalidDocChangelogContent) { +} else if (invalidReleaseNotesContent) { console.log( - 'The documentation changelog seems to contains Git conflict markers like "<<<<<<<", "=======" or ">>>>>>>"' + 'The release notes seems to contains Git conflict markers like "<<<<<<<", "=======" or ">>>>>>>"' ); process.exit(1); }