Skip to content

Commit 93d9153

Browse files
committed
Use distribution version in the detached DistributionResolver
Update logic to use version from distribution. It no longer needs to use overridden version in system property as it should be the same as in the distribution.
1 parent 7ad95d5 commit 93d9153

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ private void registerInternalDistributionResolutions(List<DistributionResolution
108108
//
109109
// -Dtests.bwc.refspec.main=deadbeef -Dtests.bwc.main.version=9.0.0
110110
//
111-
// The 'test.bwc.main.version' property should map to the version returned by the commit referenced in 'tests.bwc.refspec.main'.
111+
// The distribution version set by 'test.bwc.main.version' property should map to the version returned by the commit
112+
// referenced in 'tests.bwc.refspec.main'.
112113
resolutions.add(new DistributionResolution("detached", (project, distribution) -> {
113114
if (distribution.isDetachedVersion()) {
114-
String versionProperty = System.getProperty("tests.bwc.main.version");
115115
BwcVersions.UnreleasedVersionInfo unreleasedVersionInfo = new BwcVersions.UnreleasedVersionInfo(
116-
Version.fromString(versionProperty),
116+
Version.fromString(distribution.getVersion()),
117117
"main",
118118
":distribution:bwc:main"
119119
);

0 commit comments

Comments
 (0)