Class: Fastlane::Actions::IosCompletecodefreezePrechecksAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



54
55
56
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb', line 54

def self.authors
  ['Automattic']
end

.available_optionsObject



38
39
40
41
42
43
44
45
46
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb', line 38

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :skip_confirm,
                                 env_name: 'FL_IOS_COMPLETECODEFREEZE_PRECHECKS_SKIPCONFIRM',
                                 description: 'Skips confirmation',
                                 is_string: false, # true: verifies the input is a string, false: every kind of value
                                 default_value: false), # the default value if the user didn't provide one
  ]
end

.descriptionObject



30
31
32
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb', line 30

def self.description
  'Runs some prechecks before finalizing a code freeze'
end

.detailsObject



34
35
36
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb', line 34

def self.details
  'Runs some prechecks before finalizing a code freeze'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb', line 58

def self.is_supported?(platform)
  [:ios, :mac].include?(platform)
end

.outputObject



48
49
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb', line 48

def self.output
end

.return_valueObject



51
52
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb', line 51

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
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb', line 4

def self.run(params)
  UI.message "Skip confirm: #{params[:skip_confirm]}"

  require_relative '../../helper/ios/ios_version_helper'
  require_relative '../../helper/ios/ios_git_helper'

  UI.user_error!('This is not a release branch. Abort.') unless other_action.git_branch.start_with?('release/')

  version = Fastlane::Helper::Ios::VersionHelper.get_public_version
  message = "Completing code freeze for: #{version}\n"
  if params[:skip_confirm]
    UI.message(message)
  else
    UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
  end

  # Check local repo status
  other_action.ensure_git_status_clean()

  version
end