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 [email protected] or file a JIRA ticket
with INFRA.
---