From 6fc8e4357d96c4df85ff8a51f0e216ac5e71a40a Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 6 Feb 2026 14:36:19 +0100 Subject: [PATCH 1/2] [Release script] Ensure that the release version will match the next Monday date. --- tools/release/release.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/release/release.sh b/tools/release/release.sh index d89cc1ca0f..f80fc289a5 100755 --- a/tools/release/release.sh +++ b/tools/release/release.sh @@ -97,14 +97,17 @@ git pull printf "\n================================================================================\n" # Guessing version to propose a default version versionsFile="./plugins/src/main/kotlin/Versions.kt" -# Get current year on 2 digits -versionYearCandidate=$(date +%y) +# The version of the release must match the date of next monday, where the release is supposed to go live +# The command below gets the date of next monday +newtMondayDateCommand="date -v +1w -v -monday" +# Get release year on 2 digits +versionYearCandidate=$(${newtMondayDateCommand} +%y) currentVersionMonth=$(grep "val versionMonth" ${versionsFile} | cut -d " " -f6) -# Get current month on 2 digits -versionMonthCandidate=$(date +%m) +# Get release month on 2 digits +versionMonthCandidate=$(${newtMondayDateCommand} +%m) versionMonthCandidateNoLeadingZero=${versionMonthCandidate/#0/} currentVersionReleaseNumber=$(grep "val versionReleaseNumber" ${versionsFile} | cut -d " " -f6) -# if the current month is the same as the current version, we increment the release number, else we reset it to 0 +# if the release month is the same as the current version, we increment the release number, else we reset it to 0 if [[ ${currentVersionMonth} -eq ${versionMonthCandidateNoLeadingZero} ]]; then versionReleaseNumberCandidate=$((currentVersionReleaseNumber + 1)) else @@ -112,7 +115,7 @@ else fi versionCandidate="${versionYearCandidate}.${versionMonthCandidate}.${versionReleaseNumberCandidate}" -read -r -p "Please enter the release version (example: ${versionCandidate}). Format must be 'YY.MM.x' or 'YY.MM.xy'. Just press enter if ${versionCandidate} is correct. " version +read -r -p "Please enter the release version (example: ${versionCandidate}). Format must be 'YY.MM.x' or 'YY.MM.xy', with year and month matching next Monday. Just press enter if ${versionCandidate} is correct. " version version=${version:-${versionCandidate}} # extract year, month and release number for future use From e1c37d24aac30b35c52b94f973ac0775edaa287c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 6 Feb 2026 16:32:59 +0100 Subject: [PATCH 2/2] Fix typo --- tools/release/release.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/release/release.sh b/tools/release/release.sh index f80fc289a5..72829dd8cc 100755 --- a/tools/release/release.sh +++ b/tools/release/release.sh @@ -99,12 +99,12 @@ printf "\n====================================================================== versionsFile="./plugins/src/main/kotlin/Versions.kt" # The version of the release must match the date of next monday, where the release is supposed to go live # The command below gets the date of next monday -newtMondayDateCommand="date -v +1w -v -monday" +nextMondayDateCommand="date -v +1w -v -monday" # Get release year on 2 digits -versionYearCandidate=$(${newtMondayDateCommand} +%y) +versionYearCandidate=$(${nextMondayDateCommand} +%y) currentVersionMonth=$(grep "val versionMonth" ${versionsFile} | cut -d " " -f6) # Get release month on 2 digits -versionMonthCandidate=$(${newtMondayDateCommand} +%m) +versionMonthCandidate=$(${nextMondayDateCommand} +%m) versionMonthCandidateNoLeadingZero=${versionMonthCandidate/#0/} currentVersionReleaseNumber=$(grep "val versionReleaseNumber" ${versionsFile} | cut -d " " -f6) # if the release month is the same as the current version, we increment the release number, else we reset it to 0