From 20059d353a15e178dab8b2de4e5f782280639224 Mon Sep 17 00:00:00 2001 From: uboness <uboness@gmail.com> Date: Wed, 29 Apr 2015 18:00:56 +0200 Subject: [PATCH] fixed the watcher info API To return the right build info & version Fixes elastic/elasticsearch#258 Original commit: elastic/x-pack-elasticsearch@53f5189978ba80b9513d0b48a6f42d676aec6ba6 --- pom.xml | 6 ++++++ .../java/org/elasticsearch/watcher/WatcherVersion.java | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 815157c1b55..b573494597f 100644 --- a/pom.xml +++ b/pom.xml @@ -9,6 +9,12 @@ <artifactId>elasticsearch-watcher</artifactId> <version>1.0.0-Beta1-SNAPSHOT</version> + <scm> + <connection>scm:git:git@github.com:elastic/elasticsearch-watcher.git</connection> + <developerConnection>scm:git:git@github.com:elastic/elasticsearch-watcher.git</developerConnection> + <url>http://github.com/elastic/elasticsearch-watcher</url> + </scm> + <parent> <groupId>org.sonatype.oss</groupId> <artifactId>oss-parent</artifactId> diff --git a/src/main/java/org/elasticsearch/watcher/WatcherVersion.java b/src/main/java/org/elasticsearch/watcher/WatcherVersion.java index a8e35630b47..2013aec8c14 100644 --- a/src/main/java/org/elasticsearch/watcher/WatcherVersion.java +++ b/src/main/java/org/elasticsearch/watcher/WatcherVersion.java @@ -25,10 +25,10 @@ public class WatcherVersion implements Serializable { // the (internal) format of the id is there so we can easily do after/before checks on the id // The first internal beta has already been released, without this class being here, so we start version version 2. - 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, true, Version.V_1_4_0, LicenseVersion.V_1_0_0); + public static final int V_1_0_0_Beta1_ID = /*00*/1000001; + public static final WatcherVersion V_1_0_0_Beta1 = new WatcherVersion(V_1_0_0_Beta1_ID, true, Version.V_1_4_0, LicenseVersion.V_1_0_0); - public static final WatcherVersion CURRENT = V_1_0_0_Beta2; + public static final WatcherVersion CURRENT = V_1_0_0_Beta1; public static WatcherVersion readVersion(StreamInput in) throws IOException { return fromId(in.readVInt()); @@ -36,8 +36,8 @@ public class WatcherVersion implements Serializable { public static WatcherVersion fromId(int id) { switch (id) { - case V_1_0_0_Beta2_ID: - return V_1_0_0_Beta2; + case V_1_0_0_Beta1_ID: + return V_1_0_0_Beta1; default: return new WatcherVersion(id, null, Version.CURRENT, LicenseVersion.CURRENT);