You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by xwq <gi...@git.apache.org> on 2015/12/11 07:29:41 UTC

[GitHub] incubator-trafodion pull request: [TRAFDOION-1666]script to update...

GitHub user xwq opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/223

    [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.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/xwq/incubator-trafodion master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/223.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #223
    
----
commit 678109210fdb50ff5ffc9a4d8697edb4cc61b79b
Author: Weiqing Xu <we...@esgyn.cn>
Date:   2015-12-11T06:20:43Z

    [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.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request: [TRAFDOION-1666]script to update...

Posted by xwq <gi...@git.apache.org>.
Github user xwq commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/223#discussion_r47427963
  
    --- Diff: win-odbc64/odbcclient/update_version.pl ---
    @@ -97,4 +97,80 @@ sub update_file {
         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 ) {
    --- End diff --
    
    In my environment, new file will has the same permissions as the old. However the developer who use the tool to update the version should check the new file again before committing them. 
    Since we have too many files need to be updated in windows odbc driver when we update the Traofion version, it's very easy to miss some file if we don't use a tool.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request: [TRAFDOION-1666]script to update...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-trafodion/pull/223


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---