Skip to content

Commit 3d78c94

Browse files
authored
[bwc] Add bugfix3 project (#126880)
1 parent a813949 commit 3d78c94

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

build-tools-internal/src/integTest/resources/org/elasticsearch/gradle/internal/fake_git/remote/settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rootProject.name = "root"
1111

1212
include ":distribution:bwc:bugfix"
1313
include ":distribution:bwc:bugfix2"
14+
include ":distribution:bwc:bugfix3"
1415
include ":distribution:bwc:minor"
1516
include ":distribution:bwc:major"
1617
include ":distribution:bwc:staged"

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private Map<Version, UnreleasedVersionInfo> computeUnreleased(List<String> devel
165165
.sorted(reverseOrder(comparing(s -> Version.fromString(s, Version.Mode.RELAXED))))
166166
.toList();
167167

168-
boolean existingBugfix = false;
168+
int bugfixCount = 0;
169169
boolean existingStaged = false;
170170
for (int i = 0; i < featureFreezeBranches.size(); i++) {
171171
String branch = featureFreezeBranches.get(i);
@@ -198,9 +198,9 @@ private Map<Version, UnreleasedVersionInfo> computeUnreleased(List<String> devel
198198
result.put(version, new UnreleasedVersionInfo(version, branch, ":distribution:bwc:" + project));
199199
existingStaged = true;
200200
} else { // This is a bugfix
201-
String project = existingBugfix ? "bugfix2" : "bugfix";
201+
bugfixCount++;
202+
String project = "bugfix" + (bugfixCount > 1 ? bugfixCount : "");
202203
result.put(version, new UnreleasedVersionInfo(version, branch, ":distribution:bwc:" + project));
203-
existingBugfix = true;
204204
}
205205
}
206206

build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ allprojects {
301301
// ensure we have best possible caching of bwc builds
302302
dependsOn ":distribution:bwc:bugfix:buildBwcLinuxTar"
303303
dependsOn ":distribution:bwc:bugfix2:buildBwcLinuxTar"
304+
dependsOn ":distribution:bwc:bugfix3:buildBwcLinuxTar"
304305
dependsOn ":distribution:bwc:minor:buildBwcLinuxTar"
305306
dependsOn ":distribution:bwc:staged:buildBwcLinuxTar"
306307
dependsOn ":distribution:bwc:staged2:buildBwcLinuxTar"

distribution/bwc/bugfix3/build.gradle

Whitespace-only changes.

settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ List projects = [
7878
'distribution:packages:rpm',
7979
'distribution:bwc:bugfix',
8080
'distribution:bwc:bugfix2',
81+
'distribution:bwc:bugfix3',
8182
'distribution:bwc:maintenance',
8283
'distribution:bwc:minor',
8384
'distribution:bwc:staged',

0 commit comments

Comments
 (0)