Class: Fastlane::Actions::TestfairyAction
- Inherits:
-
Fastlane::Action
- Object
- Fastlane::Action
- Fastlane::Actions::TestfairyAction
- Defined in:
- lib/fastlane/actions/testfairy.rb
Documentation collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .output ⇒ Object
Class Method Summary collapse
Methods inherited from Fastlane::Action
action_name, author, details, method_missing, other_action, return_value, sh, step_text
Class Method Details
.authors ⇒ Object
89 90 91 |
# File 'lib/fastlane/actions/testfairy.rb', line 89 def self. ["taka0125"] end |
.available_options ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/fastlane/actions/testfairy.rb', line 55 def self. [ FastlaneCore::ConfigItem.new(key: :api_key, env_name: "FL_TESTFAIRY_API_KEY", # The name of the environment variable description: "API Key for TestFairy", # a short description of this parameter verify_block: proc do |value| UI.user_error!("No API key for TestFairy given, pass using `api_key: 'key'`") unless value.to_s.length > 0 end), FastlaneCore::ConfigItem.new(key: :ipa, env_name: 'TESTFAIRY_IPA_PATH', description: 'Path to your IPA file. Optional if you use the `gym` or `xcodebuild` action', default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH], verify_block: proc do |value| UI.user_error!("Couldn't find ipa file at path '#{value}'") unless File.exist?(value) end), FastlaneCore::ConfigItem.new(key: :comment, env_name: "FL_TESTFAIRY_COMMENT", description: "Additional release notes for this upload. This text will be added to email notifications", default_value: 'No comment provided'), # the default value if the user didn't provide one FastlaneCore::ConfigItem.new(key: :testers_groups, type: Array, short_option: '-g', env_name: "FL_TESTFAIRY_TESTERS_GROUPS", description: "Array of tester groups to be notified", default_value: []) # the default value is an empty list ] end |
.description ⇒ Object
51 52 53 |
# File 'lib/fastlane/actions/testfairy.rb', line 51 def self.description 'Upload a new build to TestFairy' end |
.is_supported?(platform) ⇒ Boolean
93 94 95 |
# File 'lib/fastlane/actions/testfairy.rb', line 93 def self.is_supported?(platform) platform == :ios end |
.output ⇒ Object
83 84 85 86 87 |
# File 'lib/fastlane/actions/testfairy.rb', line 83 def self.output [ ['TESTFAIRY_BUILD_URL', 'URL of the newly uploaded build'] ] end |
.run(params) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fastlane/actions/testfairy.rb', line 8 def self.run(params) require 'shenzhen' require 'shenzhen/plugins/testfairy' UI.success('Starting with ipa upload to TestFairy...') client = Shenzhen::Plugins::TestFairy::Client.new( params[:api_key] ) return params[:ipa] if Helper.test? = params.values [:testers_groups] = params[:testers_groups].join(',') response = client.upload_build(params[:ipa], ) if parse_response(response) UI.success("Build URL: #{Actions.lane_context[SharedValues::TESTFAIRY_BUILD_URL]}") UI.success("Build successfully uploaded to TestFairy.") else UI.user_error!("Error when trying to upload ipa to TestFairy") end end |