Skip to content

Commit cab7c41

Browse files
committed
Cleanup
1 parent 3e9558f commit cab7c41

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

build-tools/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -756,48 +756,6 @@ public void requiresFeature(String feature, Version from, Version until) {
756756
featureFlags.add(new FeatureFlag(feature, from, until));
757757
}
758758

759-
private boolean isUbuntu2404OrLater() {
760-
try {
761-
if (OS.current() != OS.LINUX) {
762-
return false;
763-
}
764-
765-
// Read /etc/os-release file to get distribution info
766-
Path osRelease = Path.of("/etc/os-release");
767-
if (!Files.exists(osRelease)) {
768-
return false;
769-
}
770-
771-
String content = Files.readString(osRelease);
772-
boolean isUbuntu = content.contains("ID=ubuntu");
773-
774-
if (!isUbuntu) {
775-
return false;
776-
}
777-
778-
// Extract version
779-
String versionLine = content.lines().filter(line -> line.startsWith("VERSION_ID=")).findFirst().orElse("");
780-
781-
if (versionLine.isEmpty()) {
782-
return false;
783-
}
784-
785-
String version = versionLine.substring("VERSION_ID=".length()).replace("\"", "");
786-
String[] parts = version.split("\\.");
787-
788-
if (parts.length >= 2) {
789-
int major = Integer.parseInt(parts[0]);
790-
int minor = Integer.parseInt(parts[1]);
791-
return major > 24 || (major == 24 && minor >= 4);
792-
}
793-
794-
return false;
795-
} catch (Exception e) {
796-
LOGGER.debug("Failed to detect Ubuntu version", e);
797-
return false;
798-
}
799-
}
800-
801759
private void runElasticsearchBinScriptWithInput(String input, String tool, CharSequence... args) {
802760
if (Files.exists(getDistroDir().resolve("bin").resolve(tool)) == false
803761
&& Files.exists(getDistroDir().resolve("bin").resolve(tool + ".bat")) == false) {

0 commit comments

Comments
 (0)