Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Oct 16, 2024
1 parent 6f553ab commit 73e2d04
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
8 changes: 0 additions & 8 deletions buildSrc/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,3 @@
*/

include 'reaper'

//dependencyResolutionManagement {
// versionCatalogs {
// libs {
// from(files("../gradle/libs.versions.toml"))
// }
// }
//}
Original file line number Diff line number Diff line change
Expand Up @@ -136,37 +136,6 @@ private static Properties getVersionProperties() {
return props;
}

private static void loadBuildSrcVersion(Properties loadedProps, Properties systemProperties) {
String opensearch = loadedProps.getProperty("opensearch");
if (opensearch == null) {
throw new IllegalStateException("OpenSearch version is missing from properties.");
}
if (opensearch.matches("[0-9]+\\.[0-9]+\\.[0-9]+") == false) {
throw new IllegalStateException("Expected opensearch version to be numbers only of the form X.Y.Z but it was: " + opensearch);
}
String qualifier = systemProperties.getProperty("build.version_qualifier", "");
if (qualifier.isEmpty() == false) {
if (qualifier.matches("(alpha|beta|rc)\\d+") == false) {
throw new IllegalStateException("Invalid qualifier: " + qualifier);
}
opensearch += "-" + qualifier;
}
final String buildSnapshotSystemProperty = systemProperties.getProperty("build.snapshot", "true");
switch (buildSnapshotSystemProperty) {
case "true":
opensearch += "-SNAPSHOT";
break;
case "false":
// do nothing
break;
default:
throw new IllegalArgumentException(
"build.snapshot was set to [" + buildSnapshotSystemProperty + "] but can only be unset or [true|false]"
);
}
loadedProps.put("opensearch", opensearch);
}

public static boolean isOpenSearchSnapshot() {
return opensearch.endsWith("-SNAPSHOT");
}
Expand Down

0 comments on commit 73e2d04

Please sign in to comment.