Skip to content

Commit ce8ab0b

Browse files
committed
Automate updating promote-a-build.sh
- It should include a proper `<past></past>` that can be computed and added automatically at the start of each cycle. - Also update upload-to-staging.sh with the most recent +1s. #353
1 parent 45b5d23 commit ce8ab0b

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

releng/org.eclipse.epp.config/org.eclipse.epp.releng.updater/src/org/eclipse/epp/releng/updater/Updater.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,20 @@ private void visit(Path file) throws IOException {
220220
+ "\"\\s+name=\"" + SIMREL_VERSION_MATCHER + "\"", SIMREL_VERSION, SIMREL_VERSION);
221221
} else if (fileName.equals("MANIFEST.MF")) {
222222
apply(file, "Bundle-Version: " + PLATFORM_VERSION_MATCHER + "\\.0\\.qualifier", PLATFORM_VERSION);
223+
} else if (fileName.equals("promote-a-build.sh")) {
224+
var pattern = Pattern.compile("<past>(?<version>20[2-9][0-9]-(?:03|06|09|12))/R</past>(?<nl>\r?\n)EOM");
225+
var content = getContent(file);
226+
var matcher = pattern.matcher(content);
227+
if (!matcher.find()) {
228+
throw new IllegalStateException("Expecting a proper match in " + relativePathName);
229+
}
230+
var expectedPastVersion = getSimRelVersion(PLATFORM_VERSION, -2);
231+
if (!expectedPastVersion.equals(matcher.group("version"))) {
232+
var modifiedContent = content.substring(0, matcher.end("nl")) //
233+
+ "<past>" + expectedPastVersion + "/R</past>" + matcher.group("nl")//
234+
+ content.substring(matcher.end("nl"));
235+
contents.put(file, modifiedContent);
236+
}
223237
} else if (relativePathName.equals("RELEASING.md")) {
224238
// TODO
225239
}

releng/org.eclipse.epp.config/tools/promote-a-build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ cat > release.xml <<EOM
9090
<past>2024-06/R</past>
9191
<past>2024-09/R</past>
9292
<past>2024-12/R</past>
93+
<past>2025-03/R</past>
9394
EOM
9495
if [ "$RELEASE_MILESTONE" != "R" ]; then
9596
cat >> release.xml <<EOM

releng/org.eclipse.epp.config/tools/upload-to-staging.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ cpp - 2025-06 RC2
5959
dsl - 2025-06 M2
6060
embedcpp - 2024-09 RC2
6161
java - 2025-06 RC1
62-
jee - 2025-06 RC2
63-
modeling - 2025-06 RC1
62+
jee - 2025-09 RC1
63+
modeling - 2025-09 RC1
6464
php - 2025-06 M1
6565
rcp - 2025-06 RC2
6666
scout - 2025-03 RC2
@@ -69,8 +69,8 @@ Platforms:
6969
Linux x86_64 - 2025-06 RC2
7070
Linux aarch64 - 2023-09 RC2
7171
Linux riscv64 - 2025-09 M2
72-
Windows x86_64 - 2025-06 RC1
73-
Windows on Arm - 2025-06 RC2
72+
Windows x86_64 - 2025-09 RC1
73+
Windows on Arm - 2025-09 RC1
7474
macOS x86_64 - 2024-09 RC2
7575
macOS aarch64 - 2025-06 M2
7676

0 commit comments

Comments
 (0)