Skip to content

Commit

Permalink
Bump up version to 2.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
kubo committed Jan 12, 2022
1 parent 92db658 commit 27c0ecd
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 38 deletions.
15 changes: 15 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# @markup markdown

2.2.10 (2022-01-12)
===================

- Use `File.exist?` instead of removed `File.exists?` in Ruby 3.2 (GH-242)

(contributed by Yasuo Honda)

- Support ruby 3.1 distributed by rubyinstaller.org

- Remove code for obsolete platforms
- Ruby compiled by Borland C++
- macOS released several years ago

- Detect arm64 macOS shared library in oraconf.rb in preparation for Instant Client for Apple Silicon release.

2.2.9 (2020-12-30)
==================

Expand Down
1 change: 0 additions & 1 deletion dist-files
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ docs/install-instant-client.md
docs/install-on-osx.md
docs/ldap-auth-and-function-interposition.md
docs/number-type-mapping.md
docs/osx-install-dev-tools.png
docs/platform-specific-issues.md
docs/report-installation-issue.md
docs/timeout-parameters.md
Expand Down
2 changes: 1 addition & 1 deletion lib/oci8/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class OCI8
VERSION = "2.2.9"
VERSION = "2.2.10"
end
84 changes: 48 additions & 36 deletions mkpkg-win32.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@
(line =~ /VERSION = "([^"]*)"/) && $1
end.compact[0]

case ARGV[0]
when '32'
$platform = 'x86'
$platform = ARGV[0]

def run_cmd(cmd, raise_on_error = true)
system(cmd)
raise $?.to_s if raise_on_error && $?.to_i != 0
end

case $platform
when 'x86-mingw32'
$ruby_base_dirs = []

$ruby_base_dirs =
Expand All @@ -15,11 +21,10 @@
'c:\ruby\rubyinstaller-2.6.0-1-x86',
'c:\ruby\rubyinstaller-2.7.0-1-x86',
'c:\ruby\rubyinstaller-3.0.0-1-x86',
'c:\ruby\rubyinstaller-3.1.0-1-x86',
]

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

$build_ruby_dirs =
Expand All @@ -28,48 +33,65 @@
['c:\ruby\rubyinstaller-2.6.0-1-x86', $ridk_setup],
['c:\ruby\rubyinstaller-2.7.0-1-x86', $ridk_setup],
['c:\ruby\rubyinstaller-3.0.0-1-x86', $ridk_setup],
['c:\ruby\rubyinstaller-3.1.0-1-x86', $ridk_setup],
]

$cygwin_dir = 'c:\cygwin'

when '64'
$platform = 'x64'
when 'x64-mingw32'
$ruby_base_dirs =
[
# RubyInstaller <URL:http://rubyinstaller.org>
'c:\ruby\rubyinstaller-2.5.0-1-x64',
'c:\ruby\rubyinstaller-2.6.0-1-x64',
'c:\ruby\rubyinstaller-2.7.0-1-x64',
'c:\ruby\rubyinstaller-3.0.0-1-x64',
'c:\ruby\rubyinstaller-3.1.0-1-x64',
]

$oracle_path = 'c:\oracle\instantclient_19_9-win64'
$devkit_mingw64_setup = 'c:\ruby\devkit-mingw64-64\devkitvars.bat'
$ridk_setup = 'ridk enable'
$build_ruby_dirs =
[
['c:\ruby\rubyinstaller-2.5.0-1-x64', $ridk_setup, :disable_fortify_source],
['c:\ruby\rubyinstaller-2.6.0-1-x64', $ridk_setup],
['c:\ruby\rubyinstaller-2.7.0-1-x64', $ridk_setup],
['c:\ruby\rubyinstaller-3.0.0-1-x64', $ridk_setup],
['c:\ruby\rubyinstaller-3.1.0-1-x64', $ridk_setup],
]

when 'x64-mingw-ucrt'
$ruby_base_dirs =
[
# RubyInstaller <URL:http://rubyinstaller.org>
'c:\ruby\rubyinstaller-3.1.0-1-x64',
]

$oracle_path = 'c:\oracle\instantclient_19_9-win64'
$ridk_setup = 'ridk enable'
$build_ruby_dirs =
[
['c:\ruby\rubyinstaller-3.1.0-1-x64', $ridk_setup],
]

$cygwin_dir = 'c:\cygwin64'
when 'all'
FileUtils.cp_r('.', 'c:\build\ruby-oci8-build-64')
FileUtils.cp_r('.', 'c:\build\ruby-oci8-build-32')
Dir.chdir('c:\build\ruby-oci8-build-64') do
system('ruby mkpkg-win32.rb 64')
end
Dir.chdir('c:\build\ruby-oci8-build-32') do
system('ruby mkpkg-win32.rb 32')
files = File.read('dist-files').split("\n")
['x86-mingw32', 'x64-mingw32', 'x64-mingw-ucrt'].each do |platform|
FileUtils.rm_rf platform
files.each do |file|
dest = File.join(platform, file)
FileUtils.mkdir_p File.dirname(dest)
FileUtils.copy(file, dest)
end
Dir.chdir platform do
run_cmd("#{RbConfig.ruby} ../mkpkg-win32.rb #{platform}")
end
end
exit 0
else
puts "#{ARGV[0]} (32|64|all)"
puts "#{ARGV[0]} (x86-mingw32|x64-mingw32|x64-mingw-ucrt|all)"
exit 0
end

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

def prepend_path(basedir, others = [])
Expand All @@ -93,11 +115,6 @@ def ruby_oci8_gem_is_installed?
false
end

def run_cmd(cmd, raise_on_error = true)
system(cmd)
raise $?.to_s if raise_on_error && $?.to_i != 0
end

def make_gem
Dir.glob('ext/oci8/oci8lib_*.so') do |file|
File.delete file
Expand Down Expand Up @@ -132,22 +149,17 @@ def install_and_test
raise "ruby-oci8 gem in #{base_dir} could not be uninstalled."
end
end
run_cmd("gem install ./#{$gem_package} --local")
run_cmd("ruby -I. test/test_all.rb", false)
begin
run_cmd("gem install ./#{$gem_package} --local")
run_cmd("ruby -I. test/test_all.rb", false)
ensure
run_cmd("gem uninstall ruby-oci8 --platform #{$platform}")
end
end
end
end

def test_on_cygwin
prepend_path($cygwin_dir) do
run_cmd("ruby setup.rb config")
run_cmd("ruby setup.rb setup")
run_cmd("ruby -Iext/oci8 -Ilib -I. test/test_all.rb", false)
end
end

make_gem
ENV['LOCAL'] ||= '//172.17.0.2/ORCLPDB1'
ENV['NLS_LANG'] ||= 'American_America.AL32UTF8'
install_and_test
test_on_cygwin

0 comments on commit 27c0ecd

Please sign in to comment.