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

Now uses Ruby 2.4 (previously 2.2) and builds on Catalina 10.15 (previously El Capitan 10.11) #98

Closed
wants to merge 1 commit into from

Conversation

joshdholtz
Copy link
Member

Fixes fastlane/fastlane#15496

Motivation

Problem

  • Packaged fastlane used Ruby 2.2 which is too old for some fastlane dependencies and causes installation issues leading to packaged fastlane installed version 2.28.3
  • Packaged fastlane could also only be built on OSX 10.1

Goal

  • Build new packaged fastlane with Ruby 2.4 on Catalina

Description

  • Removed aws-sdk-v1 which had a dependency of nokogiri as this was only used for the Fabric app
  • Removed the namespace and building of the Fabric app
  • Removed using the RubyTask to manually build Ruby 2.2
    • Replaced with ruby-build (which is what rbenv uses) which now builds Ruby 2.4 with OpenSSL
  • Removed the building of installed OSX gems (I think this is okay??? 🤔)
    • Seemed to be causing problems and was full of hacks/patches

Results

Screen Shot 2019-11-05 at 6 04 38 PM

@joshdholtz joshdholtz changed the title Removed manual Ruby install in favor of ruby-build Now uses Ruby 2.4 (previously 2.2) and builds on Catalina 10.15 (previously El Capitan 10.11) Nov 6, 2019
@joshdholtz
Copy link
Member Author

Turns out this currently has some harcoded absolute paths to /Users/josh 😱 Need to look into 😔

@KrauseFx
Copy link
Member

KrauseFx commented Nov 6, 2019

Wow!

@@ -145,32 +145,9 @@ module FastlaneRake
@@installed_openssl = openssl_tasks.installed_path
def self.openssl_task
@@installed_openssl
raise "ugh - #{@@installed_openssl}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💣

@@ -210,7 +187,7 @@ module FastlaneRake
# ------------------------------------------------------------------------------
@@installed_bundler_bin = File.join(BUNDLE_DESTROOT, 'bin/bundle')
file @@installed_bundler_bin => rubygems_update_dir do
install_gem 'bundler'
install_gem 'bundler', '1.13.6'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay to lock on this specific version? Maybe '~> 1.13' is fine?

@@ -14,7 +13,7 @@ WORKBENCH_DIR = FastlaneRake::WORKBENCH_DIR
DOWNLOAD_DIR = FastlaneRake::DOWNLOAD_DIR
DESTROOT = FastlaneRake::DESTROOT
FASTLANE_GEM_VERSION = FastlaneRake::FASTLANE_GEM_VERSION
XCODE_PATH = '/Applications/Xcode-7.3.1.app'
RUBY__VERSION = FastlaneRake::RUBY__VERSION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The double-underscore looks like a mistake. Intentional on FastlaneRake ? Also, doesn't extending bring in the constants already?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit, I see the need for the double-under (RUBY_VERSION is already defined). Lets call it something else. INSTALL_VERSION or something.

@@ -108,7 +108,7 @@ module FastlaneRake
READLINE_VERSION = '6.3'
READLINE_URL = "http://ftpmirror.gnu.org/readline/readline-#{READLINE_VERSION}.tar.gz"

RUBY__VERSION = '2.2.4'
RUBY__VERSION = '2.4.5'
RUBY_URL = "http://cache.ruby-lang.org/pub/ruby/2.2/ruby-#{RUBY__VERSION}.tar.gz"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see need for the double-under.

http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.4.5.tar.gz returns a 404. RUBY_URL looks unused.

Copy link
Contributor

@ohayon ohayon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so awesome! Can't believe you got this working. 🎉

require 'json'

load './bundle_tasks.rake'
extend FastlaneRake

BUNDLE_VERSION = 1.8
BUNDLE_VERSION = 1.9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like this is major version bump worthy?

task :build_ruby do
full_path = File.join(DESTROOT, 'bundle')

command = "/usr/local/bin/ruby-build #{RUBY__VERSION} #{full_path}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doe we require that ruby-build is already installed?

command = "/usr/local/bin/ruby-build #{RUBY__VERSION} #{full_path}"
puts "Install Command: #{command}"

success = system({'RUBY_CONFIGURE_OPTS' => '--with-openssl-dir=/usr/local/opt/openssl'}, command)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth getting the error output here to show on failure?

@@ -108,7 +108,7 @@ module FastlaneRake
READLINE_VERSION = '6.3'
READLINE_URL = "http://ftpmirror.gnu.org/readline/readline-#{READLINE_VERSION}.tar.gz"

RUBY__VERSION = '2.2.4'
RUBY__VERSION = '2.4.5'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to use an even later version?

@joshdholtz
Copy link
Member Author

Closing this in favor of #99

@joshdholtz joshdholtz closed this Nov 8, 2019
@KrauseFx KrauseFx deleted the ruby-2.4-and-built-on-catalina branch November 11, 2019 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When installing via homebrew it downloads version 2.28.3 instead of the latest version
5 participants