Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(maint) Update acceptance to fix windows ruby install #3219

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions acceptance/setup/common/pre-suite/010_install_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@
# HACK: to add chocolatey path to cygwin: this path should at least be
# instrospected from the STDOUT of the installer.
bolt.add_env_var('PATH', '/cygdrive/c/ProgramData/chocolatey/bin:PATH')
on(bolt, powershell('choco install ruby -y --version 2.5.3.101'))
on(bolt, powershell('choco list --lo ruby')) do |output|
version = /ruby (2\.[0-9])/.match(output.stdout)[1].delete('.')
on(bolt, powershell('choco install ruby -y'))
on(bolt, powershell('choco list ruby')) do |output|
version = /ruby ([2-3]\.[0-9])/.match(output.stdout)[1].delete('.')
bolt.add_env_var('PATH', "/cygdrive/c/tools/ruby#{version}/bin:PATH")
end
# The ruby devkit (required to build gems with C extensions) has changed,
# and we now need to install msys2 ourselves. https://community.chocolatey.org/packages/msys2
on(bolt, powershell('choco install msys2 -y --params "/NoUpdate"'))
on(bolt, powershell('ridk install 2 3'))
# Add the msys bins to PATH
bolt.add_env_var('PATH', "/cygdrive/c/tools/msys64:PATH")
# public_suffix for win requires Ruby version >= 2.6
# current Ruby 2.5.0 works with public_suffix version 4.0.7
on(bolt, powershell('gem install public_suffix -v 4.0.7'))
Expand Down
Loading