Class: Fastlane::Actions::GsStartExternalTestingAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::GsStartExternalTestingAction
- Defined in:
- lib/fastlane/plugin/gs_deliver/actions/gs_start_external_testing.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
34 35 36 |
# File 'lib/fastlane/plugin/gs_deliver/actions/gs_start_external_testing.rb', line 34 def self. ["Сергей Веселовский"] end |
.available_options ⇒ Object
47 48 49 50 51 |
# File 'lib/fastlane/plugin/gs_deliver/actions/gs_start_external_testing.rb', line 47 def self. require "pilot" require "pilot/options" FastlaneCore::CommanderGenerator.new.generate(Pilot::Options.) end |
.description ⇒ Object
30 31 32 |
# File 'lib/fastlane/plugin/gs_deliver/actions/gs_start_external_testing.rb', line 30 def self.description "Gradoservice plugin to rule apps releases" end |
.details ⇒ Object
42 43 44 45 |
# File 'lib/fastlane/plugin/gs_deliver/actions/gs_start_external_testing.rb', line 42 def self.details # Optional: "Gradoservice plugin to rule apps releases for our scheme" end |
.is_supported?(platform) ⇒ Boolean
53 54 55 56 57 58 59 |
# File 'lib/fastlane/plugin/gs_deliver/actions/gs_start_external_testing.rb', line 53 def self.is_supported?(platform) # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example) # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md # # [:ios, :mac, :android].include?(platform) true end |
.return_value ⇒ Object
38 39 40 |
# File 'lib/fastlane/plugin/gs_deliver/actions/gs_start_external_testing.rb', line 38 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(params) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/fastlane/plugin/gs_deliver/actions/gs_start_external_testing.rb', line 6 def self.run(params) build_manager = Pilot::BuildManager.new build_manager.start(params) platform = build_manager.fetch_app_platform(required: false) builds = build_manager.app.all_processing_builds(platform: platform) + build_manager.app.builds(platform: platform) # sort by upload_date builds.sort! { |a, b| a.upload_date <=> b.upload_date } build = builds.last if build.nil? UI.user_error!("No builds found.") return end if build.processing UI.user_error!("Build #{build.train_version}(#{build.build_version}) is still processing.") return end if build.testing_status == "External" UI.user_error!("Build #{build.train_version}(#{build.build_version}) has already been distributed.") return end build.build_train.update_testing_status!(true, 'external', build) end |