Class: Fastlane::Actions::IosCheckBetaDepsAction

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

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



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

def self.authors
  ['Automattic']
end

.available_optionsObject



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

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :podfile,
                                 env_name: 'FL_IOS_CHECKBETADEPS_PODFILE',
                                 description: 'Path to the Podfile to analyse',
                                 type: String),
  ]
end

.descriptionObject



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

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

.detailsObject



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

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

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


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

def self.is_supported?(platform)
  %i[ios mac].include?(platform)
end

.outputObject



46
47
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb', line 46

def self.output
end

.return_valueObject



49
50
51
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb', line 49

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

def self.run(params)
  require_relative '../../helper/ios/ios_version_helper'
  require_relative '../../helper/ios/ios_git_helper'

  beta_pods = []
  File.open(params[:podfile]).each do |li|
    beta_pods << li if li.match('^\s*\t*pod.*beta')
  end

  if beta_pods.count.zero?
    UI.message('No beta pods found. You can continue with the code freeze.')
  else
    message = "The following pods are still in beta:\n"
    beta_pods.each do |bpod|
      message << "#{bpod}\n"
    end
    message << 'Please update to the released version before continuing with the code freeze.'
  end
  UI.important(message)
end