Class: Fastlane::Actions::AnnaiUpgradeSetupAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::AnnaiUpgradeSetupAction
- Defined in:
- lib/fastlane/plugin/ann_flutter_flavor/actions/ann_setup_action.rb
Overview
AnnaiUpgradeSetupAction: Runs comprehensive setup and maintenance
Class Method Summary collapse
- .available_options ⇒ Object
- .description ⇒ Object
- .example_code ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.available_options ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/actions/ann_setup_action.rb', line 47 def self. [ FastlaneCore::ConfigItem.new(key: :force, description: "Force the execution even if conditions might advise skipping", optional: true, is_string: false, default_value: false, type: Boolean) ] end |
.description ⇒ Object
58 59 60 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/actions/ann_setup_action.rb', line 58 def self.description "Runs comprehensive Flutter and Fastlane maintenance (upgrade, doctor, bundle update, gem install)." end |
.example_code ⇒ Object
66 67 68 69 70 71 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/actions/ann_setup_action.rb', line 66 def self.example_code [ 'annai_upgrade_setup', 'annai_upgrade_setup(force: true)' ] end |
.is_supported?(platform) ⇒ Boolean
62 63 64 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/actions/ann_setup_action.rb', line 62 def self.is_supported?(platform) true end |
.run(params) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/actions/ann_setup_action.rb', line 15 def self.run(params) # 1. Determine the necessary paths and managers root_folder = FastlaneFlutterFlavor::ProjectUtil.find_flutter_root status_manager = FastlaneFlutterFlavor::StatusManager.new(lane: self) # 2. Instantiate SetupLanes directly setup_lanes = FastlaneFlutterFlavor::SetupLanes.new( root_folder: root_folder, status_manager: status_manager, ) Fastlane::UI.("Starting comprehensive setup and maintenance (Force: #{params[:force]})...") # 3. Execute the maintenance routine setup_lanes.upgrade_setup(force: params[:force]) Fastlane::UI.success("✅ Upgrade setup completed successfully.") # 4. Finalize status reporting status_manager.displayStatus rescue => e # Log the error using the StatusManager instance if status_manager # Pass 'self' (the class) as the lane context for consistency status_manager.logError(self, 'annai_upgrade_setup', nil, e) status_manager.displayStatus end raise "AnnaiUpgradeSetupAction failed: #{e.}" end |