Class: Fastlane::Actions::SelectXcodeAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::SelectXcodeAction
- Defined in:
- lib/fastlane/plugin/stream_actions/actions/select_xcode.rb
Documentation collapse
Class Method Summary collapse
Class Method Details
.available_options ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/fastlane/plugin/stream_actions/actions/select_xcode.rb', line 21 def self. [ FastlaneCore::ConfigItem.new( key: :version, env_name: 'GITHUB_REPOSITORY', description: 'Xcode version' ) ] end |
.description ⇒ Object
17 18 19 |
# File 'lib/fastlane/plugin/stream_actions/actions/select_xcode.rb', line 17 def self.description 'Select Xcode version' end |
.is_supported?(platform) ⇒ Boolean
31 32 33 |
# File 'lib/fastlane/plugin/stream_actions/actions/select_xcode.rb', line 31 def self.is_supported?(platform) [:ios].include?(platform) end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/fastlane/plugin/stream_actions/actions/select_xcode.rb', line 4 def self.run(params) xcodes = sh('ls /Applications | grep Xcode') UI.user_error!("Xcode #{params[:version]} is not installed") unless xcodes.include?(params[:version]) sh("sudo xcode-select -s /Applications/Xcode_#{params[:version]}.app") sh('xcodebuild -version') sh('xcrun simctl list runtimes | grep iOS') end |