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



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

def self.authors
  ['Automattic']
end

.available_optionsObject



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb', line 33

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :build_gradle_path,
                                 description: 'Path to the build.gradle file',
                                 type: String,
                                 optional: true,
                                 conflicting_options: [:version_properties_path]),
    FastlaneCore::ConfigItem.new(key: :version_properties_path,
                                 description: 'Path to the version.properties file',
                                 type: String,
                                 optional: true,
                                 conflicting_options: [:build_gradle_path]),
  ]
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)


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

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

.outputObject



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

def self.output
end

.return_valueObject



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

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

.run(params) ⇒ Object



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

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

  build_gradle_path = params[:build_gradle_path]
  version_properties_path = params[:version_properties_path]

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