You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2015/12/17 17:34:20 UTC

[1/2] incubator-trafodion git commit: [TRAFDOION-1666]script to update win-odbc version

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master e188f6968 -> aa6d9dee1


[TRAFDOION-1666]script to update win-odbc version

update the scirpt to make it can update the version number in build_os.bat
and the inno setup script.


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

Branch: refs/heads/master
Commit: 678109210fdb50ff5ffc9a4d8697edb4cc61b79b
Parents: 07b73d9
Author: Weiqing Xu <we...@esgyn.cn>
Authored: Fri Dec 11 14:20:43 2015 +0800
Committer: Weiqing Xu <we...@esgyn.cn>
Committed: Fri Dec 11 14:20:43 2015 +0800

----------------------------------------------------------------------
 win-odbc64/odbcclient/update_version.pl | 84 ++++++++++++++++++++++++++--
 1 file changed, 80 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/67810921/win-odbc64/odbcclient/update_version.pl
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/update_version.pl b/win-odbc64/odbcclient/update_version.pl
index 693640c..be892a9 100644
--- a/win-odbc64/odbcclient/update_version.pl
+++ b/win-odbc64/odbcclient/update_version.pl
@@ -71,12 +71,12 @@ sub update_file {
             print OUTFILE;
         }
         elsif( /SOFTWARE\\\\ODBC\\\\ODBCINST.INI\\\\TRAF ODBC /) {
-        	s/(\d+)\.(\d+)/$major.$minor/;
-        	print OUTFILE;
+            s/(\d+)\.(\d+)/$major.$minor/;
+            print OUTFILE;
         }
         elsif( /DRIVER_NAME\[\] = "TRAF ODBC / ) {
-        	s/(\d+)\.(\d+)/$major.$minor/;
-        	print OUTFILE;
+            s/(\d+)\.(\d+)/$major.$minor/;
+            print OUTFILE;
         }
         else {
             print OUTFILE;
@@ -97,4 +97,80 @@ foreach $file (@resource_files) {
     update_file $file
 }
 
+# update the version in build_os.bat
+sub update_build_os {
+    my $infile = $_[0];
+    print  "Update " , $infile, "\n";
+    my $outfile = $infile + '.tmp';
+    open( INFILE, $infile ) or die "Error: Can't open $infile - $!";
+    open( OUTFILE, ">$outfile" ) or die "Error: Can't open $outfile - $!";
+
+    while ( <INFILE> ) {
+        if (/TFODBC64-/) {
+            s/(\d+)\.(\d+)\.(\d+)/$major.$minor.$sp/;
+            print OUTFILE;
+        }
+        else {
+            print OUTFILE;
+        }
+    }
+
+
+    close( INFILE ) or warn "Warning: Can't close $infile - $!";
+    close( OUTFILE ) or warn "Warning: Can't close $outfile - $!";
+
+    unless ( rename $outfile, $infile ) {
+
+        print "Error: Updating Version for $infile failed.\n";
+        exit 1;
+    }
+}
+
+update_build_os "build_os.bat";
+
+# update the version in inno setup script
+sub update_innosetup_script {
+    my $infile = $_[0];
+    print  "Update " , $infile, "\n";
+    my $outfile = $infile + '.tmp';
+    open( INFILE, $infile ) or die "Error: Can't open $infile - $!";
+    open( OUTFILE, ">$outfile" ) or die "Error: Can't open $outfile - $!";
+
+    while ( <INFILE> ) {
+        # update MyAppname
+        if ( /MyAppName "Trafodion ODBC64/ ) {
+            s/(\d+)\.(\d+)/$major.$minor/;
+            print OUTFILE;
+        }
+        # update MyAppVersion
+        elsif ( /MyAppVersion "/) {
+            s/(\d+)\.(\d+)\.(\d+)/$major.$minor.$sp/;
+            print OUTFILE;
+        }
+        # update the MyDriverName
+        elsif ( /MyDriverName "TRAF ODBC / ) {
+            s/(\d+)\.(\d+)/$major.$minor/;
+            print OUTFILE;
+        }
+        # update DefaultDirName
+        elsif ( /TRAF ODBC / ) {
+            s/(\d+)\.(\d+)/$major.$minor/;
+            print OUTFILE;
+        }
+        else {
+            print OUTFILE;
+        }
+    }
+
+    close( INFILE ) or warn "Warning: Can't close $infile - $!";
+    close( OUTFILE ) or warn "Warning: Can't close $outfile - $!";
+
+    unless ( rename $outfile, $infile ) {
+
+        print "Error: Updating Version for $infile failed.\n";
+        exit 1;
+    }
+}
+update_innosetup_script "../Install/win64_installer/installer.iss";
+
 exit 0;


[2/2] incubator-trafodion git commit: Merge [TRAFODION-1666] PR 223 Script to update win-odbc version

Posted by db...@apache.org.
Merge [TRAFODION-1666] PR 223 Script to update win-odbc version


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

Branch: refs/heads/master
Commit: aa6d9dee187b140d923e0ad767a036217bad4062
Parents: e188f69 6781092
Author: Dave Birdsall <db...@apache.org>
Authored: Thu Dec 17 16:33:26 2015 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Thu Dec 17 16:33:26 2015 +0000

----------------------------------------------------------------------
 win-odbc64/odbcclient/update_version.pl | 84 ++++++++++++++++++++++++++--
 1 file changed, 80 insertions(+), 4 deletions(-)
----------------------------------------------------------------------