Class: Fastlane::Actions::IosFinalizePrechecksAction

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

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



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

def self.authors
  ['Automattic']
end

.available_optionsObject



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

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :skip_confirm,
                                 env_name: 'FL_IOS_FINALIZE_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_finalize_prechecks.rb', line 30

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

.detailsObject



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

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

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


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

def self.is_supported?(platform)
  platform == :ios
end

.outputObject



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

def self.output
end

.return_valueObject



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

def self.return_value
  'The current app version'
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_finalize_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 = "Finalizing release: #{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