Class: Fastlane::Actions::AndroidTagBuildAction

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

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



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

def self.authors
  ['Automattic']
end

.available_optionsObject



26
27
28
29
30
31
32
33
34
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb', line 26

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :tag_alpha,
                                 env_name: 'FL_ANDROID_TAG_BUILD_ALPHA',
                                 description: 'True to skip tagging the alpha version',
                                 is_string: false,
                                 default_value: true),
  ]
end

.descriptionObject



18
19
20
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb', line 18

def self.description
  'Tags the current build'
end

.detailsObject



22
23
24
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb', line 22

def self.details
  'Tags the current build'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


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

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

.outputObject



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

def self.output
end

.return_valueObject



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

def self.return_value
end

.run(params) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb', line 4

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

  release_ver = Fastlane::Helper::Android::VersionHelper.get_release_version
  alpha_ver = Fastlane::Helper::Android::VersionHelper.get_alpha_version
  Fastlane::Helper::GitHelper.create_tag(release_ver[Fastlane::Helper::Android::VersionHelper::VERSION_NAME])
  Fastlane::Helper::GitHelper.create_tag(alpha_ver[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]) unless alpha_ver.nil? || (params[:tag_alpha] == false)
end