Class: Fastlane::Actions::GetExtensionsAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::GetExtensionsAction
- Defined in:
- lib/fastlane/plugin/ci_apps/actions/get_extensions.rb
Documentation collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .output ⇒ Object
- .return_value ⇒ Object
Class Method Summary collapse
- .find_project(params) ⇒ Object
- .find_target(params) ⇒ Object
- .get_ci_app(params) ⇒ Object
- .get_ci_apps(params) ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
98 99 100 101 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 98 def self. # So no one will ever forget your contribution to fastlane :) You are awesome btw! ["Your GitHub/Twitter Name"] end |
.available_options ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 66 def self. # Define all options your action supports. # Below a few examples [ FastlaneCore::ConfigItem.new(key: :project, env_name: "FL_GET_EXTENSIONS_PROJECT_PATH", # The name of the environment variable description: "API Token for GetExtensionsAction", # a short description of this parameter verify_block: proc do |value| UI.user_error!("No API token for GetExtensionsAction given, pass using `api_token: 'token'`") unless (value and not value.empty?) # UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value) end), FastlaneCore::ConfigItem.new(key: :target, env_name: "FL_GET_EXTENSIONS_TARGET_NAME", description: "Create a development certificate instead of a distribution one", is_string: false, # true: verifies the input is a string, false: every kind of value default_value: false) # the default value if the user didn't provide one ] end |
.description ⇒ Object
56 57 58 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 56 def self.description "A short description with <= 80 characters of what this action does" end |
.details ⇒ Object
60 61 62 63 64 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 60 def self.details # Optional: # this is your chance to provide a more detailed description of this action "You can use this action to do cool things..." end |
.find_project(params) ⇒ Object
15 16 17 18 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 15 def self.find_project(params) project = Xcodeproj::Project.open(params[:xcodeproj]) project end |
.find_target(params) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 20 def self.find_target(params) project = find_project(params) if params[:target] target = project.targets.detect { |t| t.name == params[:target] } target else # firstly we are trying to find modern application target target = project.targets.detect do |t| t.kind_of?(Xcodeproj::Project::Object::PBXNativeTarget) && t.product_type == 'com.apple.product-type.application' end target = project.targets[0] if target.nil? target end end |
.get_ci_app(params) ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 43 def self.get_ci_app(params) ciApps = get_ci_apps(params) ciApps.each do |app| if app["APP_ID"] == params[:app_id] then return app end end end |
.get_ci_apps(params) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 36 def self.get_ci_apps(params) infoPlistPath = find_info(params) info = Xcodeproj::Plist.read_from_path(infoPlistPath) ciAPPs = info["CI_APPS"] ciAPPs end |
.is_supported?(platform) ⇒ Boolean
103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 103 def self.is_supported?(platform) # you can do things like # # true # # platform == :ios # # [:ios, :mac].include?(platform) # platform == :ios end |
.output ⇒ Object
86 87 88 89 90 91 92 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 86 def self.output # Define the shared values you are going to provide # Example [ ['GET_EXTENSIONS_CUSTOM_VALUE', 'A description of what this value contains'] ] end |
.return_value ⇒ Object
94 95 96 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 94 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(params) ⇒ Object
10 11 12 13 |
# File 'lib/fastlane/plugin/ci_apps/actions/get_extensions.rb', line 10 def self.run(params) end |