ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [1/2] incubator-ignite git commit: # IGNITE-228: Changing version.
Date Fri, 13 Feb 2015 07:55:31 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/sprint-1 5aba02348 -> 8b7a2c1a9


# IGNITE-228: Changing version.


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

Branch: refs/heads/sprint-1
Commit: ce926e973a65d5f40a79e0c8096aaf605fe05e83
Parents: 0012a52
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Feb 13 10:50:34 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Feb 13 10:50:34 2015 +0300

----------------------------------------------------------------------
 .../ignite/lang/IgniteProductVersion.java       | 12 ++++++------
 .../product/GridProductVersionSelfTest.java     | 20 ++++++++++++++++++++
 pom.xml                                         |  2 +-
 3 files changed, 27 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ce926e97/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 3dbe5dc..e5f865d 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
@@ -40,7 +40,7 @@ public class IgniteProductVersion implements Comparable<IgniteProductVersion>,
E
 
     /** Regexp parse pattern. */
     private static final Pattern VER_PATTERN =
-        Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(-([^0123456789][^-]+))?(-(\\d+))?(-([\\da-f]+))?");
+        Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(-([^0123456789][^-]+)(-SNAPSHOT)?)?(-(\\d+))?(-([\\da-f]+))?");
 
     /** Major version number. */
     private byte major;
@@ -267,17 +267,17 @@ public class IgniteProductVersion implements Comparable<IgniteProductVersion>,
E
                 String stage = "";
 
                 if (match.group(4) != null)
-                    stage = match.group(5);
+                    stage = match.group(4).substring(1);
 
                 long revTs = 0;
 
-                if (match.group(6) != null)
-                    revTs = Long.parseLong(match.group(7));
+                if (match.group(7) != null)
+                    revTs = Long.parseLong(match.group(8));
 
                 byte[] revHash = null;
 
-                if (match.group(8) != null)
-                    revHash = U.decodeHex(match.group(9).toCharArray());
+                if (match.group(9) != null)
+                    revHash = U.decodeHex(match.group(10).toCharArray());
 
                 return new IgniteProductVersion(major, minor, maintenance, stage, revTs,
revHash);
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ce926e97/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 02f1878..6d966df 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
@@ -104,6 +104,26 @@ 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-SNAPSHOT-4-18e5a7ec9e3202126a69bc231a6b965bc1d73dee");
+
+        assertEquals(1, ver.major());
+        assertEquals(2, ver.minor());
+        assertEquals(3, ver.maintenance());
+        assertEquals("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());
+
+        ver = IgniteProductVersion.fromString("1.2.3-rc1-SNAPSHOT-4-18e5a7ec9e3202126a69bc231a6b965bc1d73dee");
+
+        assertEquals(1, ver.major());
+        assertEquals(2, ver.minor());
+        assertEquals(3, ver.maintenance());
+        assertEquals("rc1-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());
+
         IgniteProductVersion.fromString(VER_STR + '-' + BUILD_TSTAMP + '-' + REV_HASH_STR);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ce926e97/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e6d502e..5eb3202 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
     </parent>
 
     <properties>
-        <ignite.version>1.0.0-SNAPSHOT</ignite.version>
+        <ignite.version>1.0.0-RC1-SNAPSHOT</ignite.version>
         <ignite.edition>fabric</ignite.edition>
         <hadoop.version>2.4.1</hadoop.version>
         <spring.version>4.1.0.RELEASE</spring.version>


Mime
View raw message