Skip to content

Commit 27c0ecd

Browse files
committed
Bump up version to 2.2.10
1 parent 92db658 commit 27c0ecd

File tree

4 files changed

+64
-38
lines changed

4 files changed

+64
-38
lines changed

NEWS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# @markup markdown
22

3+
2.2.10 (2022-01-12)
4+
===================
5+
6+
- Use `File.exist?` instead of removed `File.exists?` in Ruby 3.2 (GH-242)
7+
8+
(contributed by Yasuo Honda)
9+
10+
- Support ruby 3.1 distributed by rubyinstaller.org
11+
12+
- Remove code for obsolete platforms
13+
- Ruby compiled by Borland C++
14+
- macOS released several years ago
15+
16+
- Detect arm64 macOS shared library in oraconf.rb in preparation for Instant Client for Apple Silicon release.
17+
318
2.2.9 (2020-12-30)
419
==================
520

dist-files

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ docs/install-instant-client.md
1919
docs/install-on-osx.md
2020
docs/ldap-auth-and-function-interposition.md
2121
docs/number-type-mapping.md
22-
docs/osx-install-dev-tools.png
2322
docs/platform-specific-issues.md
2423
docs/report-installation-issue.md
2524
docs/timeout-parameters.md

lib/oci8/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
class OCI8
2-
VERSION = "2.2.9"
2+
VERSION = "2.2.10"
33
end

mkpkg-win32.rb

Lines changed: 48 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@
44
(line =~ /VERSION = "([^"]*)"/) && $1
55
end.compact[0]
66

7-
case ARGV[0]
8-
when '32'
9-
$platform = 'x86'
7+
$platform = ARGV[0]
8+
9+
def run_cmd(cmd, raise_on_error = true)
10+
system(cmd)
11+
raise $?.to_s if raise_on_error && $?.to_i != 0
12+
end
13+
14+
case $platform
15+
when 'x86-mingw32'
1016
$ruby_base_dirs = []
1117

1218
$ruby_base_dirs =
@@ -15,11 +21,10 @@
1521
'c:\ruby\rubyinstaller-2.6.0-1-x86',
1622
'c:\ruby\rubyinstaller-2.7.0-1-x86',
1723
'c:\ruby\rubyinstaller-3.0.0-1-x86',
24+
'c:\ruby\rubyinstaller-3.1.0-1-x86',
1825
]
1926

2027
$oracle_path = 'c:\oracle\instantclient_19_9-win32'
21-
$devkit_tdm_setup = 'c:\ruby\devkit-tdm-32\devkitvars.bat'
22-
$devkit_mingw64_setup = 'c:\ruby\devkit-mingw64-32\devkitvars.bat'
2328
$ridk_setup = 'ridk enable'
2429

2530
$build_ruby_dirs =
@@ -28,48 +33,65 @@
2833
['c:\ruby\rubyinstaller-2.6.0-1-x86', $ridk_setup],
2934
['c:\ruby\rubyinstaller-2.7.0-1-x86', $ridk_setup],
3035
['c:\ruby\rubyinstaller-3.0.0-1-x86', $ridk_setup],
36+
['c:\ruby\rubyinstaller-3.1.0-1-x86', $ridk_setup],
3137
]
3238

33-
$cygwin_dir = 'c:\cygwin'
34-
35-
when '64'
36-
$platform = 'x64'
39+
when 'x64-mingw32'
3740
$ruby_base_dirs =
3841
[
3942
# RubyInstaller <URL:http://rubyinstaller.org>
4043
'c:\ruby\rubyinstaller-2.5.0-1-x64',
4144
'c:\ruby\rubyinstaller-2.6.0-1-x64',
4245
'c:\ruby\rubyinstaller-2.7.0-1-x64',
4346
'c:\ruby\rubyinstaller-3.0.0-1-x64',
47+
'c:\ruby\rubyinstaller-3.1.0-1-x64',
4448
]
4549

4650
$oracle_path = 'c:\oracle\instantclient_19_9-win64'
47-
$devkit_mingw64_setup = 'c:\ruby\devkit-mingw64-64\devkitvars.bat'
4851
$ridk_setup = 'ridk enable'
4952
$build_ruby_dirs =
5053
[
5154
['c:\ruby\rubyinstaller-2.5.0-1-x64', $ridk_setup, :disable_fortify_source],
5255
['c:\ruby\rubyinstaller-2.6.0-1-x64', $ridk_setup],
5356
['c:\ruby\rubyinstaller-2.7.0-1-x64', $ridk_setup],
5457
['c:\ruby\rubyinstaller-3.0.0-1-x64', $ridk_setup],
58+
['c:\ruby\rubyinstaller-3.1.0-1-x64', $ridk_setup],
59+
]
60+
61+
when 'x64-mingw-ucrt'
62+
$ruby_base_dirs =
63+
[
64+
# RubyInstaller <URL:http://rubyinstaller.org>
65+
'c:\ruby\rubyinstaller-3.1.0-1-x64',
66+
]
67+
68+
$oracle_path = 'c:\oracle\instantclient_19_9-win64'
69+
$ridk_setup = 'ridk enable'
70+
$build_ruby_dirs =
71+
[
72+
['c:\ruby\rubyinstaller-3.1.0-1-x64', $ridk_setup],
5573
]
5674

57-
$cygwin_dir = 'c:\cygwin64'
5875
when 'all'
59-
FileUtils.cp_r('.', 'c:\build\ruby-oci8-build-64')
60-
FileUtils.cp_r('.', 'c:\build\ruby-oci8-build-32')
61-
Dir.chdir('c:\build\ruby-oci8-build-64') do
62-
system('ruby mkpkg-win32.rb 64')
63-
end
64-
Dir.chdir('c:\build\ruby-oci8-build-32') do
65-
system('ruby mkpkg-win32.rb 32')
76+
files = File.read('dist-files').split("\n")
77+
['x86-mingw32', 'x64-mingw32', 'x64-mingw-ucrt'].each do |platform|
78+
FileUtils.rm_rf platform
79+
files.each do |file|
80+
dest = File.join(platform, file)
81+
FileUtils.mkdir_p File.dirname(dest)
82+
FileUtils.copy(file, dest)
83+
end
84+
Dir.chdir platform do
85+
run_cmd("#{RbConfig.ruby} ../mkpkg-win32.rb #{platform}")
86+
end
6687
end
88+
exit 0
6789
else
68-
puts "#{ARGV[0]} (32|64|all)"
90+
puts "#{ARGV[0]} (x86-mingw32|x64-mingw32|x64-mingw-ucrt|all)"
6991
exit 0
7092
end
7193

72-
$gem_package = "ruby-oci8-#{$ruby_oci8_version}-#{$platform}-mingw32.gem"
94+
$gem_package = "ruby-oci8-#{$ruby_oci8_version}-#{$platform}.gem"
7395
ENV['PATH'] = $oracle_path + ';c:\Windows\System32'
7496

7597
def prepend_path(basedir, others = [])
@@ -93,11 +115,6 @@ def ruby_oci8_gem_is_installed?
93115
false
94116
end
95117

96-
def run_cmd(cmd, raise_on_error = true)
97-
system(cmd)
98-
raise $?.to_s if raise_on_error && $?.to_i != 0
99-
end
100-
101118
def make_gem
102119
Dir.glob('ext/oci8/oci8lib_*.so') do |file|
103120
File.delete file
@@ -132,22 +149,17 @@ def install_and_test
132149
raise "ruby-oci8 gem in #{base_dir} could not be uninstalled."
133150
end
134151
end
135-
run_cmd("gem install ./#{$gem_package} --local")
136-
run_cmd("ruby -I. test/test_all.rb", false)
152+
begin
153+
run_cmd("gem install ./#{$gem_package} --local")
154+
run_cmd("ruby -I. test/test_all.rb", false)
155+
ensure
156+
run_cmd("gem uninstall ruby-oci8 --platform #{$platform}")
157+
end
137158
end
138159
end
139160
end
140161

141-
def test_on_cygwin
142-
prepend_path($cygwin_dir) do
143-
run_cmd("ruby setup.rb config")
144-
run_cmd("ruby setup.rb setup")
145-
run_cmd("ruby -Iext/oci8 -Ilib -I. test/test_all.rb", false)
146-
end
147-
end
148-
149162
make_gem
150163
ENV['LOCAL'] ||= '//172.17.0.2/ORCLPDB1'
151164
ENV['NLS_LANG'] ||= 'American_America.AL32UTF8'
152165
install_and_test
153-
test_on_cygwin

0 commit comments

Comments
 (0)