ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [33/35] ignite git commit: IGNITE-2074 Platforms C++ files have 1.5.0-EA version
Date Thu, 03 Dec 2015 13:18:10 GMT
IGNITE-2074 Platforms C++ files have 1.5.0-EA version

Signed-off-by: Anton Vinogradov <av@apache.org>


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

Branch: refs/heads/ignite-1626
Commit: 86ec37e5e7bb6302ebff35fecb5576206adc1e1a
Parents: ad9e4db
Author: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Authored: Thu Dec 3 12:45:29 2015 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Thu Dec 3 14:48:00 2015 +0300

----------------------------------------------------------------------
 pom.xml | 41 +++++++++++++++++++++++++++++------------
 1 file changed, 29 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/86ec37e5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 109dc94..5f86648 100644
--- a/pom.xml
+++ b/pom.xml
@@ -774,20 +774,37 @@
                                     <target>
                                         <script language="javascript">
                                             function setClientVersion(ggVer, clientVer) {
-                                            var p = project.getProperty(ggVer);
+                                                var p = project.getProperty(ggVer);
 
-                                            if (java.util.regex.Pattern.matches(".*-p\\d+",
p))
-                                            project.setProperty(clientVer, p.replace("-p",
"."));
-                                            else
-                                            if (java.util.regex.Pattern.matches(".*-[a-zA-Z]+\\d+.*",
p))
-                                            project.setProperty(clientVer, p.replaceAll("-[a-zA-Z]+(\\d+)?.*",
".$1"));
-                                            else
-                                            project.setProperty(clientVer, p);
+                                                var pos = p.search("-");
+
+                                                if (pos > 0)
+                                                {
+                                                    var suffix = p.substring(pos);
+
+                                                    var ver = 0;
+
+                                                    var beta = /-b([0-9]+)/.exec(suffix);
+                                                    if (beta !== null)
+                                                        ver += parseInt(beta[1]);
+
+                                                    var patch = /-p([0-9]+)/.exec(suffix);
+                                                    if (patch !== null)
+                                                        ver += parseInt(patch[1]) * 100;
+
+                                                    if (suffix.search("final") > 0)
+                                                        ver += 10000;
+
+                                                    var resVer = p.substring(0, pos) +"."
+ ver;
+                                                    project.setProperty(clientVer, resVer);
+                                                }
+                                                else
+                                                    project.setProperty(clientVer, p);
                                             }
 
                                             function fix(dest, source) {
-                                            project.setProperty(dest, project.getProperty(source).replace("-SNAPSHOT",
-                                            ""));
+                                                project.setProperty(dest, project.getProperty(source).replace("-SNAPSHOT",
+                                                ""));
                                             }
 
                                             fix('ignite.version.fixed', 'project.version');
@@ -810,8 +827,8 @@
 
                                         <echo message="Update ignite.version in cpp client"
/>
                                         <replaceregexp byline="true" encoding="UTF-8">
-                                            <regexp pattern="(AC_INIT.+\[)\d.\d.\d(.\d)?(\].+)"
/>
-                                            <substitution expression="\1${new.client.version}\3"
/>
+                                            <regexp pattern="(AC_INIT.+\[)\d.\d.\d.*?(\].+)"
/>
+                                            <substitution expression="\1${new.client.version}\2"
/>
                                             <fileset dir="${basedir}/">
                                                 <include name="**/configure.ac" />
                                             </fileset>


Mime
View raw message