mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 01:19:02 +00:00
updated the elasticsearch versioning format
Moving to from `X.Y.Z.beta1`/`X.Y.Z.RC1` to `X.Y.Z-beta1`/`X.Y.Z-rc1`
This commit is contained in:
parent
17906ca7d6
commit
b40186652c
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-parent</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
|
@ -499,7 +499,7 @@ public class Version {
|
||||
if (snapshot = version.endsWith("-SNAPSHOT")) {
|
||||
version = version.substring(0, version.length() - 9);
|
||||
}
|
||||
String[] parts = version.split("\\.");
|
||||
String[] parts = version.split("\\.|\\-");
|
||||
if (parts.length < 3 || parts.length > 4) {
|
||||
throw new IllegalArgumentException("the version needs to contain major, minor and revision, and optionally the build: " + version);
|
||||
}
|
||||
@ -518,7 +518,7 @@ public class Version {
|
||||
if (buildStr.startsWith("Beta") || buildStr.startsWith("beta")) {
|
||||
build = Integer.parseInt(buildStr.substring(4));
|
||||
}
|
||||
if (buildStr.startsWith("RC")) {
|
||||
if (buildStr.startsWith("RC") || buildStr.startsWith("rc")) {
|
||||
build = Integer.parseInt(buildStr.substring(2)) + 50;
|
||||
}
|
||||
}
|
||||
@ -591,13 +591,18 @@ public class Version {
|
||||
sb.append(major).append('.').append(minor).append('.').append(revision);
|
||||
if (isBeta()) {
|
||||
if (major >= 2) {
|
||||
sb.append(".beta");
|
||||
sb.append("-beta");
|
||||
} else {
|
||||
sb.append(".Beta");
|
||||
}
|
||||
sb.append(build);
|
||||
} else if (build < 99) {
|
||||
sb.append(".RC").append(build - 50);
|
||||
if (major >= 2) {
|
||||
sb.append("-rc");
|
||||
} else {
|
||||
sb.append(".RC");
|
||||
}
|
||||
sb.append(build - 50);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
@ -644,6 +649,10 @@ public class Version {
|
||||
return build < 50;
|
||||
}
|
||||
|
||||
public boolean isRC() {
|
||||
return build > 50 && build < 99;
|
||||
}
|
||||
|
||||
public static class Module extends AbstractModule {
|
||||
|
||||
private final Version version;
|
||||
|
@ -138,7 +138,7 @@ public class VersionTests extends ElasticsearchTestCase {
|
||||
|
||||
public void testToString() {
|
||||
// with 2.0.beta we lowercase
|
||||
assertEquals("2.0.0.beta1", Version.V_2_0_0_beta1.number());
|
||||
assertEquals("2.0.0-beta1", Version.V_2_0_0_beta1.number());
|
||||
assertEquals("1.4.0.Beta1", Version.V_1_4_0_Beta1.number());
|
||||
assertEquals("1.4.0", Version.V_1_4_0.number());
|
||||
}
|
||||
@ -189,7 +189,17 @@ public class VersionTests extends ElasticsearchTestCase {
|
||||
logger.info("Checking " + v);
|
||||
assertEquals("Version id " + field.getName() + " does not point to " + constantName, v, Version.fromId(versionId));
|
||||
assertEquals("Version " + constantName + " does not have correct id", versionId, v.id);
|
||||
assertEquals("V_" + v.number().replace('.', '_'), constantName);
|
||||
if (v.major >= 2) {
|
||||
String number = v.number();
|
||||
if (v.isBeta()) {
|
||||
number = number.replace("-beta", "_beta");
|
||||
} else if (v.isRC()) {
|
||||
number = number.replace("-rc", "_rc");
|
||||
}
|
||||
assertEquals("V_" + number.replace('.', '_'), constantName);
|
||||
} else {
|
||||
assertEquals("V_" + v.number().replace('.', '_'), constantName);
|
||||
}
|
||||
|
||||
// only the latest version for a branch should be a snapshot (ie unreleased)
|
||||
String branchName = "" + v.major + "." + v.minor;
|
||||
|
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-dev-tools</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
<name>Elasticsearch Build Resources</name>
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>elasticsearch-analysis-icu</artifactId>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>elasticsearch-analysis-kuromoji</artifactId>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>elasticsearch-analysis-phonetic</artifactId>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>elasticsearch-analysis-smartcn</artifactId>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>elasticsearch-analysis-stempel</artifactId>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>elasticsearch-cloud-aws</artifactId>
|
||||
|
@ -18,7 +18,7 @@ governing permissions and limitations under the License. -->
|
||||
<parent>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>elasticsearch-cloud-azure</artifactId>
|
||||
|
@ -18,7 +18,7 @@ governing permissions and limitations under the License. -->
|
||||
<parent>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>elasticsearch-cloud-gce</artifactId>
|
||||
|
@ -18,7 +18,7 @@ governing permissions and limitations under the License. -->
|
||||
<parent>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>elasticsearch-delete-by-query</artifactId>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>elasticsearch-lang-javascript</artifactId>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>elasticsearch-lang-python</artifactId>
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Elasticsearch Plugin POM</name>
|
||||
<inceptionYear>2009</inceptionYear>
|
||||
@ -15,7 +15,7 @@
|
||||
<parent>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-parent</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-parent</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Elasticsearch Parent POM</name>
|
||||
<description>Elasticsearch Parent POM</description>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-rest-api-spec</artifactId>
|
||||
<version>2.0.0.beta1-SNAPSHOT</version>
|
||||
<version>2.0.0-beta1-SNAPSHOT</version>
|
||||
<name>Elasticsearch Rest API Spec</name>
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
|
Loading…
x
Reference in New Issue
Block a user