Class: Fastlane::Actions::SetPodKeyAction
- Inherits:
-
Fastlane::Action
- Object
- Fastlane::Action
- Fastlane::Actions::SetPodKeyAction
- Defined in:
- lib/fastlane/actions/set_pod_key.rb
Constant Summary
Constants inherited from Fastlane::Action
Fastlane::Action::AVAILABLE_CATEGORIES
Documentation collapse
- .available_options ⇒ Object
- .category ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .example_code ⇒ Object
- .is_supported?(platform) ⇒ Boolean
Class Method Summary collapse
Methods inherited from Fastlane::Action
action_name, authors, lane_context, method_missing, other_action, output, return_value, sample_return_value, sh, step_text
Class Method Details
.author ⇒ Object
18 19 20 |
# File 'lib/fastlane/actions/set_pod_key.rb', line 18 def self. "marcelofabri" end |
.available_options ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/fastlane/actions/set_pod_key.rb', line 34 def self. [ FastlaneCore::ConfigItem.new(key: :use_bundle_exec, env_name: "FL_SET_POD_KEY_USE_BUNDLE_EXEC", description: "Use bundle exec when there is a Gemfile presented", is_string: false, default_value: true), FastlaneCore::ConfigItem.new(key: :key, env_name: "FL_SET_POD_KEY_ITEM_KEY", description: "The key to be saved with cocoapods-keys", is_string: true, optional: false), FastlaneCore::ConfigItem.new(key: :value, env_name: "FL_SET_POD_KEY_ITEM_VALUE", description: "The value to be saved with cocoapods-keys", is_string: true, optional: false), FastlaneCore::ConfigItem.new(key: :project, env_name: "FL_SET_POD_KEY_PROJECT", description: "The project name", is_string: true, optional: true) ] end |
.category ⇒ Object
73 74 75 |
# File 'lib/fastlane/actions/set_pod_key.rb', line 73 def self.category :project end |
.description ⇒ Object
26 27 28 |
# File 'lib/fastlane/actions/set_pod_key.rb', line 26 def self.description "Sets a value for a key with cocoapods-keys" end |
.details ⇒ Object
30 31 32 |
# File 'lib/fastlane/actions/set_pod_key.rb', line 30 def self.details "Adds a key to [cocoapods-keys](https://github.com/orta/cocoapods-keys)" end |
.example_code ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'lib/fastlane/actions/set_pod_key.rb', line 63 def self.example_code [ 'set_pod_key( key: "APIToken", value: "1234", project: "MyProject" )' ] end |
.is_supported?(platform) ⇒ Boolean
59 60 61 |
# File 'lib/fastlane/actions/set_pod_key.rb', line 59 def self.is_supported?(platform) [:ios, :mac].include? platform end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fastlane/actions/set_pod_key.rb', line 4 def self.run(params) Actions.verify_gem!('cocoapods-keys') cmd = [] cmd << ['bundle exec'] if File.exist?('Gemfile') && params[:use_bundle_exec] cmd << ['pod keys set'] cmd << ["\"#{params[:key].shellescape}\""] cmd << ["\"#{params[:value].shellescape}\""] cmd << ["\"#{params[:project].shellescape}\""] if params[:project] Actions.sh(cmd.join(' ')) end |