fastlane/lib/fastlane/actions/testfairy.rb in fastlane-2.96.1 vs fastlane/lib/fastlane/actions/testfairy.rb in fastlane-2.97.0
- old
+ new
@@ -73,10 +73,12 @@
case key
when :api_key
[key, value]
when :ipa
[key, value]
+ when :apk
+ [key, value]
when :symbols_file
[key, value]
when :testers_groups
[key, value.join(',')]
when :metrics
@@ -92,13 +94,16 @@
else
UI.user_error!("Unknown parameter: #{key}")
end
end]
- return params[:ipa] if Helper.test?
+ path = params[:ipa] || params[:apk]
+ UI.user_error!("No ipa or apk were given") unless path
- response = self.upload_build(params[:upload_url], params[:ipa], client_options)
+ return path if Helper.test?
+
+ response = self.upload_build(params[:upload_url], path, client_options)
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")
@@ -142,14 +147,26 @@
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 for iOS or APK for Android',
+ description: 'Path to your IPA file for iOS',
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
default_value_dynamic: true,
+ optional: true,
+ conflicting_options: [:apk],
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: :apk,
+ env_name: 'TESTFAIRY_APK_PATH',
+ description: 'Path to your APK file for Android',
+ default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH],
+ default_value_dynamic: true,
+ optional: true,
+ conflicting_options: [:ipa],
+ verify_block: proc do |value|
+ UI.user_error!("Couldn't find apk file at path '#{value}'") unless File.exist?(value)
end),
# optional
FastlaneCore::ConfigItem.new(key: :symbols_file,
optional: true,
env_name: "FL_TESTFAIRY_SYMBOLS_FILE",