mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-06 02:49:35 +00:00
Fixed the version
- moved to 2.0.0-beta1 - moved the min license version to 2.0.0 - moved to min shield version to 2.0.0 - lowercased the "beta" and "rc" part of the version Original commit: elastic/x-pack-elasticsearch@fab1983bbb
This commit is contained in:
parent
7a55a957d3
commit
38f3c8b607
2
pom.xml
2
pom.xml
@ -7,7 +7,7 @@
|
||||
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-watcher</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:elastic/elasticsearch-watcher.git</connection>
|
||||
|
@ -28,10 +28,10 @@ public class WatcherVersion implements Serializable {
|
||||
public static final WatcherVersion V_1_0_0_Beta1 = new WatcherVersion(V_1_0_0_Beta1_ID, false, Version.V_1_5_0, LicenseVersion.V_1_0_0);
|
||||
public static final int V_1_0_0_Beta2_ID = /*00*/1000002;
|
||||
public static final WatcherVersion V_1_0_0_Beta2 = new WatcherVersion(V_1_0_0_Beta2_ID, false, Version.V_1_5_0, LicenseVersion.V_1_0_0);
|
||||
public static final int V_2_0_0_ID = /*00*/2000099;
|
||||
public static final WatcherVersion V_2_0_0 = new WatcherVersion(V_2_0_0_ID, false, Version.V_1_5_0, LicenseVersion.V_1_0_0);
|
||||
public static final int V_2_0_0_Beta1_ID = /*00*/200001;
|
||||
public static final WatcherVersion V_2_0_0_Beta1 = new WatcherVersion(V_2_0_0_Beta1_ID, true, Version.V_1_5_0, LicenseVersion.V_2_0_0);
|
||||
|
||||
public static final WatcherVersion CURRENT = V_2_0_0;
|
||||
public static final WatcherVersion CURRENT = V_2_0_0_Beta1;
|
||||
|
||||
public static WatcherVersion readVersion(StreamInput in) throws IOException {
|
||||
return fromId(in.readVInt());
|
||||
@ -43,8 +43,8 @@ public class WatcherVersion implements Serializable {
|
||||
return V_1_0_0_Beta1;
|
||||
case V_1_0_0_Beta2_ID:
|
||||
return V_1_0_0_Beta2;
|
||||
case V_2_0_0_ID:
|
||||
return V_2_0_0;
|
||||
case V_2_0_0_Beta1_ID:
|
||||
return V_2_0_0_Beta1;
|
||||
default:
|
||||
return new WatcherVersion(id, null, Version.CURRENT, LicenseVersion.CURRENT);
|
||||
}
|
||||
@ -83,10 +83,10 @@ public class WatcherVersion implements Serializable {
|
||||
int build = 99;
|
||||
if (parts.length == 4) {
|
||||
String buildStr = parts[3];
|
||||
if (buildStr.startsWith("Beta")) {
|
||||
if (buildStr.startsWith("beta")) {
|
||||
build = Integer.parseInt(buildStr.substring(4));
|
||||
}
|
||||
if (buildStr.startsWith("RC")) {
|
||||
if (buildStr.startsWith("rc")) {
|
||||
build = Integer.parseInt(buildStr.substring(2)) + 50;
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ import org.elasticsearch.watcher.WatcherVersion;
|
||||
*/
|
||||
public class ShieldIntegration {
|
||||
|
||||
private static final int minCompatibleShieldVersionId = /*00*/1020199; // V_1_2_1
|
||||
private static final int MIN_SHIELD_VERSION = /*00*/2000099; // 2.0.0
|
||||
|
||||
private final boolean installed;
|
||||
private final boolean enabled;
|
||||
@ -66,10 +66,10 @@ public class ShieldIntegration {
|
||||
}
|
||||
|
||||
// lets check min compatibility
|
||||
ShieldVersion minVersion = ShieldVersion.fromId(minCompatibleShieldVersionId);
|
||||
if (!ShieldVersion.CURRENT.onOrAfter(minVersion)) {
|
||||
ShieldVersion minShieldVersion = ShieldVersion.fromId(MIN_SHIELD_VERSION);
|
||||
if (!ShieldVersion.CURRENT.onOrAfter(minShieldVersion)) {
|
||||
throw new IllegalStateException("watcher [" + WatcherVersion.CURRENT + "] requires " +
|
||||
"minimum shield plugin version [" + minVersion + "], but installed shield plugin version is " +
|
||||
"minimum shield plugin version [" + minShieldVersion + "], but installed shield plugin version is " +
|
||||
"[" + ShieldVersion.CURRENT + "]");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user