ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [52/55] [abbrv] ignite git commit: Platforms version update (cherry picked from commit c631a37)
Date Fri, 04 Sep 2015 16:28:06 GMT
Platforms version update
(cherry picked from commit c631a37)


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

Branch: refs/heads/ignite-1093-2
Commit: f0939605882fd2d696caeba54983ac702f818ece
Parents: b1a9771
Author: Anton Vinogradov <av@apache.org>
Authored: Fri Sep 4 17:28:13 2015 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Fri Sep 4 17:29:14 2015 +0300

----------------------------------------------------------------------
 pom.xml | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 118 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f0939605/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a380d13..b506889 100644
--- a/pom.xml
+++ b/pom.xml
@@ -737,6 +737,124 @@
                 </plugins>
             </build>
         </profile>
+
+        <profile>
+            <id>update-versions</id>
+            <!-- updates dotnet & cpp versions -->
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.7</version>
+                        <executions>
+                            <execution>
+                                <id>update-versions</id>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <phase>validate</phase>
+                                <configuration>
+                                    <target>
+                                        <script language="javascript">
+                                            function setClientVersion(ggVer, clientVer) {
+                                            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);
+                                            }
+
+                                            function fix(dest, source) {
+                                            project.setProperty(dest, project.getProperty(source).replace("-SNAPSHOT",
+                                            ""));
+                                            }
+
+                                            fix('ignite.version.fixed', 'project.version');
+                                            fix('new.ignite.version.fixed', 'new.ignite.version');
+                                            setClientVersion('ignite.version.fixed', 'old.client.version');
+                                            setClientVersion('new.ignite.version.fixed',
'new.client.version');
+                                        </script>
+
+                                        <echo message="Update ignite.version in dotnet
client"/>
+                                        <echo message="${new.client.version}"/>
+
+                                        <replaceregexp byline="true" encoding="UTF-8">
+                                            <regexp
+                                                pattern="(\[assembly:\s*Assembly\w*Version\w*\(&quot;)\d.\d.\d(.\d)?(&quot;\)\])"/>
+                                            <substitution expression="\1${new.client.version}\3"/>
+                                            <fileset dir="${basedir}/">
+                                                <include name="**/AssemblyInfo.cs"/>
+                                                <include name="**/AssemblyInfo.cpp"/>
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <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"/>
+                                            <fileset dir="${basedir}/">
+                                                <include name="**/configure.ac"/>
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <replaceregexp byline="true" encoding="UTF-8">
+                                            <regexp pattern="(define GG_VERSION_STR_WIN
&quot;)\d.\d.\d(.\d)?(&quot;)"/>
+                                            <substitution expression="\1${new.client.version}\3"/>
+                                            <fileset dir="${basedir}/">
+                                                <include name="**/resource.h"/>
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <replaceregexp byline="true" encoding="UTF-16">
+                                            <regexp pattern="(Version&quot;, &quot;)\d.\d.\d.\d(&quot;)"/>
+                                            <substitution expression="\1${new.client.version}\2"/>
+                                            <fileset dir="${basedir}/">
+                                                <include name="**/Resource.rc"/>
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <script language="javascript">
+                                            function setBinVersion(clientVer, binVer) {
+                                            var p = project.getProperty(clientVer).replace(".",
",");
+
+                                            if (p.split(',').length == 3)
+                                            project.setProperty(binVer, p + ',0');
+                                            else
+                                            project.setProperty(binVer, p);
+                                            }
+
+                                            setBinVersion('old.client.version', 'old.bin.version');
+                                            setBinVersion('new.client.version', 'new.bin.version');
+                                        </script>
+
+                                        <replaceregexp byline="true" encoding="UTF-8">
+                                            <regexp pattern="(define GG_VERSION_BIN_WIN
)\d,\d,\d,\d"/>
+                                            <substitution expression="\1${new.bin.version}"/>
+                                            <fileset dir="${basedir}/">
+                                                <include name="**/resource.h"/>
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <replaceregexp byline="true" encoding="UTF-16">
+                                            <regexp pattern="(VERSION )\d,\d,\d,\d"/>
+                                            <substitution expression="\1${new.bin.version}"/>
+                                            <fileset dir="${basedir}/">
+                                                <include name="**/Resource.rc"/>
+                                            </fileset>
+                                        </replaceregexp>
+                                    </target>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
     <build>


Mime
View raw message