Class: Fastlane::Actions::AndroidBuildPreflightAction

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

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



45
46
47
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 45

def self.authors
  ['Automattic']
end

.available_optionsObject



36
37
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 36

def self.available_options
end

.descriptionObject



28
29
30
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 28

def self.description
  'Clean the environment to ensure a safe build'
end

.detailsObject



32
33
34
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 32

def self.details
  'Clean the environment to ensure a safe build'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


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

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

.outputObject



39
40
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 39

def self.output
end

.return_valueObject



42
43
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 42

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

def self.run(params)
  # Validate mobile configuration secrets
  other_action.configure_apply

  # Check gems and pods are up to date. This will exit if it fails
  begin
    Action.sh('bundle check')
  rescue StandardError
    UI.user_error!("You should run 'bundle install' to make sure gems are up to date")
    raise
  end

  begin
    Action.sh('command -v bundletool > /dev/null')
  rescue StandardError
    UI.user_error!("bundletool is required to build the APKs. Install it with 'brew install bundletool'")
    raise
  end
end