Class: Fastlane::Actions::AndroidCurrentBranchIsHotfixAction

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

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



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

def self.authors
  ['Automattic']
end

.available_optionsObject



33
34
35
36
37
38
39
40
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb', line 33

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :version_properties_path,
                                 description: 'Path to the version.properties file',
                                 type: String,
                                 optional: false),
  ]
end

.descriptionObject



25
26
27
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb', line 25

def self.description
  'Checks if the current branch is for a hotfix'
end

.detailsObject



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

def self.details
  'Checks if the current branch is for a hotfix'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


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

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

.outputObject



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

def self.output
end

.return_valueObject



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

def self.return_value
  'True if the branch is for a hotfix, false otherwise'
end

.run(params) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb', line 10

def self.run(params)
  require_relative '../../helper/android/android_version_helper'

  version_properties_path = params[:version_properties_path]

  version = Fastlane::Helper::Android::VersionHelper.get_release_version(
    version_properties_path: version_properties_path
  )
  Fastlane::Helper::Android::VersionHelper.is_hotfix?(version)
end