Class: Fastlane::Actions::RecreateSchemesAction

Inherits:
Fastlane::Action show all
Defined in:
lib/fastlane/actions/recreate_schemes.rb

Constant Summary

Constants inherited from Fastlane::Action

Fastlane::Action::AVAILABLE_CATEGORIES

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, author, details, lane_context, method_missing, other_action, output, return_value, sample_return_value, sh, step_text

Class Method Details

.authorsObject



27
28
29
# File 'lib/fastlane/actions/recreate_schemes.rb', line 27

def self.authors
  "jerolimov"
end

.available_optionsObject



17
18
19
20
21
22
23
24
25
# File 'lib/fastlane/actions/recreate_schemes.rb', line 17

def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :project,
      env_name: "XCODE_PROJECT",
      description: "The Xcode project"
    )
  ]
end

.categoryObject



41
42
43
# File 'lib/fastlane/actions/recreate_schemes.rb', line 41

def self.category
  :project
end

.descriptionObject



13
14
15
# File 'lib/fastlane/actions/recreate_schemes.rb', line 13

def self.description
  "Recreate not shared Xcode project schemes"
end

.example_codeObject



35
36
37
38
39
# File 'lib/fastlane/actions/recreate_schemes.rb', line 35

def self.example_code
  [
    'recreate_schemes(project: "./path/to/MyApp.xcodeproj")'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/fastlane/actions/recreate_schemes.rb', line 31

def self.is_supported?(platform)
  [:ios, :mac].include? platform
end

.run(params) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/fastlane/actions/recreate_schemes.rb', line 4

def self.run(params)
  require 'xcodeproj'

  UI.message("Recreate schemes for project: #{params[:project]}")

  project = Xcodeproj::Project.open(params[:project])
  project.recreate_user_schemes
end