Class: Fastlane::Actions::XcodegenAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::XcodegenAction
- Defined in:
- lib/fastlane/plugin/xcodegen/actions/xcodegen_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
28 29 30 |
# File 'lib/fastlane/plugin/xcodegen/actions/xcodegen_action.rb', line 28 def self. ["Michael Ruhl"] end |
.available_options ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/fastlane/plugin/xcodegen/actions/xcodegen_action.rb', line 39 def self. [ FastlaneCore::ConfigItem.new(key: :spec, env_name: "XCODEGEN_SPEC", description: "The path to the project spec file", optional: true), FastlaneCore::ConfigItem.new(key: :project, env_name: "XCODEGEN_PROJECT", description: "The path to the folder where the project should be generated", optional: true) ] end |
.description ⇒ Object
24 25 26 |
# File 'lib/fastlane/plugin/xcodegen/actions/xcodegen_action.rb', line 24 def self.description "Runs `xcodegen` for the project" end |
.details ⇒ Object
32 33 34 35 36 37 |
# File 'lib/fastlane/plugin/xcodegen/actions/xcodegen_action.rb', line 32 def self.details [ "Will be installed with `brew` if not available", "Runs `xcodegen` for the project." ].join("\n") end |
.is_supported?(platform) ⇒ Boolean
52 53 54 |
# File 'lib/fastlane/plugin/xcodegen/actions/xcodegen_action.rb', line 52 def self.is_supported?(platform) platform == :ios end |
.run(params) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fastlane/plugin/xcodegen/actions/xcodegen_action.rb', line 7 def self.run(params) require 'fastlane/plugin/brew' Actions.sh("which xcodegen", log: false, error_callback: proc do |error_output| UI.("Installing XcodeGen") Actions::BrewAction.run(command: "tap yonaskolb/XcodeGen https://github.com/yonaskolb/XcodeGen.git") Actions::BrewAction.run(command: "install XcodeGen") end) cmd = ["xcodegen"] cmd << "--spec #{params[:spec]}" if params[:spec] cmd << "--project #{params[:project]}" if params[:project] Actions.sh(cmd.join(' ')) end |