Class: Fastlane::Actions::IosHotfixPrechecksAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::IosHotfixPrechecksAction
- Defined in:
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb
Documentation collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .output ⇒ Object
- .return_value ⇒ Object
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
69 70 71 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb', line 69 def self. ['Automattic'] end |
.available_options ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb', line 49 def self. [ FastlaneCore::ConfigItem.new(key: :version, env_name: 'FL_IOS_HOTFIX_PRECHECKS_VERSION', description: 'The version to work on', # a short description of this parameter type: String), FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_IOS_HOTFIX_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation', type: Boolean, default_value: false), # the default value if the user didn't provide one ] end |
.description ⇒ Object
41 42 43 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb', line 41 def self.description 'Runs some prechecks before preparing for a new hotfix' end |
.details ⇒ Object
45 46 47 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb', line 45 def self.details 'Checks out a new branch from a tag and updates tags' end |
.is_supported?(platform) ⇒ Boolean
73 74 75 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb', line 73 def self.is_supported?(platform) [:ios, :mac].include?(platform) end |
.output ⇒ Object
63 64 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb', line 63 def self.output end |
.return_value ⇒ Object
66 67 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb', line 66 def self.return_value end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb', line 4 def self.run(params) UI. "Skip confirm: #{params[:skip_confirm]}" UI. '' require_relative '../../helper/ios/ios_version_helper' require_relative '../../helper/ios/ios_git_helper' # Evaluate previous tag new_ver = params[:version] prev_ver = Fastlane::Helper::Ios::VersionHelper.calc_prev_hotfix_version(new_ver) # Confirm = "Requested Hotfix version: #{new_ver}\n" << "Branching from: #{prev_ver}\n" if params[:skip_confirm] UI.() else UI.user_error!('Aborted by user request') unless UI.confirm("#{}Do you want to continue?") end # Check tags UI.crash!("Version #{new_ver} already exists! Abort!") if other_action.git_tag_exists(tag: new_ver) UI.crash!("Version #{prev_ver} is not tagged! Can't branch. Abort!") unless other_action.git_tag_exists(tag: prev_ver) # Check local repo status other_action.ensure_git_status_clean # Return the current version prev_ver end |