ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject ignite git commit: .final
Date Tue, 22 Dec 2015 11:53:56 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite.final-version-test [created] dbef554be


.final


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/dbef554b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dbef554b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dbef554b

Branch: refs/heads/ignite.final-version-test
Commit: dbef554be756fe1ccc3e87a40a56a14d7e15fb73
Parents: 73d8b90
Author: Anton Vinogradov <av@apache.org>
Authored: Tue Dec 22 14:53:44 2015 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Tue Dec 22 14:53:44 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/IgniteVersionUtils.java     |  5 ++++-
 .../ignite/lang/IgniteProductVersion.java       |  2 +-
 .../product/GridProductVersionSelfTest.java     | 22 ++++++++++++++------
 3 files changed, 21 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/dbef554b/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
index 7f81cb5..02cbc81 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
@@ -53,7 +53,10 @@ public class IgniteVersionUtils {
      * Static initializer.
      */
     static {
-        VER_STR = IgniteProperties.get("ignite.version");
+        VER_STR = IgniteProperties.get("ignite.version")
+            .replace(".a", "-a") // Backward compatibility fix.
+            .replace(".b", "-b")
+            .replace(".final", "-final");
 
         BUILD_TSTAMP = Long.valueOf(IgniteProperties.get("ignite.build"));
         BUILD_TSTAMP_STR = new SimpleDateFormat("yyyyMMdd").format(new Date(BUILD_TSTAMP
* 1000));

http://git-wip-us.apache.org/repos/asf/ignite/blob/dbef554b/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java b/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
index 9826b6d..12851ba 100644
--- a/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
@@ -43,7 +43,7 @@ public class IgniteProductVersion implements Comparable<IgniteProductVersion>,
E
 
     /** Regexp parse pattern. */
     private static final Pattern VER_PATTERN =
-        Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(-([^0123456789][^-]+)(-SNAPSHOT)?)?(-(\\d+))?(-([\\da-f]+))?");
+        Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)([-.]([^0123456789][^-]+)(-SNAPSHOT)?)?(-(\\d+))?(-([\\da-f]+))?");
 
     /** Major version number. */
     private byte major;

http://git-wip-us.apache.org/repos/asf/ignite/blob/dbef554b/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
index 38422e3..92990de 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
@@ -50,21 +50,21 @@ public class GridProductVersionSelfTest extends GridCommonAbstractTest
{
         assertEquals(0, ver.revisionTimestamp());
         assertArrayEquals(new byte[20], ver.revisionHash());
 
-        ver = IgniteProductVersion.fromString("1.2.3-rc1-4-DEV");
+        ver = IgniteProductVersion.fromString("1.2.3.b1-4-DEV");
 
         assertEquals(1, ver.major());
         assertEquals(2, ver.minor());
         assertEquals(3, ver.maintenance());
-        assertEquals("rc1", ver.stage());
+        assertEquals("b1", ver.stage());
         assertEquals(4, ver.revisionTimestamp());
         assertArrayEquals(new byte[20], ver.revisionHash());
 
-        ver = IgniteProductVersion.fromString("1.2.3-GA1-4-DEV");
+        ver = IgniteProductVersion.fromString("1.2.3.final-4-DEV");
 
         assertEquals(1, ver.major());
         assertEquals(2, ver.minor());
         assertEquals(3, ver.maintenance());
-        assertEquals("GA1", ver.stage());
+        assertEquals("final", ver.stage());
         assertEquals(4, ver.revisionTimestamp());
         assertArrayEquals(new byte[20], ver.revisionHash());
 
@@ -96,6 +96,16 @@ public class GridProductVersionSelfTest extends GridCommonAbstractTest
{
         assertArrayEquals(new byte[]{24, -27, -89, -20, -98, 50, 2, 18, 106, 105, -68, 35,
26, 107, -106, 91, -63, -41, 61, -18},
             ver.revisionHash());
 
+        ver = IgniteProductVersion.fromString("1.2.3.b1-4-18e5a7ec9e3202126a69bc231a6b965bc1d73dee");
+
+        assertEquals(1, ver.major());
+        assertEquals(2, ver.minor());
+        assertEquals(3, ver.maintenance());
+        assertEquals("b1", ver.stage());
+        assertEquals(4, ver.revisionTimestamp());
+        assertArrayEquals(new byte[]{24, -27, -89, -20, -98, 50, 2, 18, 106, 105, -68, 35,
26, 107, -106, 91, -63, -41, 61, -18},
+            ver.revisionHash());
+
         ver = IgniteProductVersion.fromString("1.2.3-rc1-4-18e5a7ec9e3202126a69bc231a6b965bc1d73dee");
 
         assertEquals(1, ver.major());
@@ -116,12 +126,12 @@ public class GridProductVersionSelfTest extends GridCommonAbstractTest
{
         assertArrayEquals(new byte[]{24, -27, -89, -20, -98, 50, 2, 18, 106, 105, -68, 35,
26, 107, -106, 91, -63, -41, 61, -18},
             ver.revisionHash());
 
-        ver = IgniteProductVersion.fromString("1.2.3-rc1-SNAPSHOT-4-18e5a7ec9e3202126a69bc231a6b965bc1d73dee");
+        ver = IgniteProductVersion.fromString("1.2.3.b1-SNAPSHOT-4-18e5a7ec9e3202126a69bc231a6b965bc1d73dee");
 
         assertEquals(1, ver.major());
         assertEquals(2, ver.minor());
         assertEquals(3, ver.maintenance());
-        assertEquals("rc1-SNAPSHOT", ver.stage());
+        assertEquals("b1-SNAPSHOT", ver.stage());
         assertEquals(4, ver.revisionTimestamp());
         assertArrayEquals(new byte[]{24, -27, -89, -20, -98, 50, 2, 18, 106, 105, -68, 35,
26, 107, -106, 91, -63, -41, 61, -18},
             ver.revisionHash());


Mime
View raw message