Class: Fastlane::Actions::IosBumpVersionBetaAction

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

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



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

def self.authors
  ['Automattic']
end

.available_optionsObject



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

def self.available_options
end

.create_configObject



50
51
52
53
54
55
56
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb', line 50

def self.create_config
  @current_version = Fastlane::Helper::Ios::VersionHelper.get_build_version
  @current_version_internal = Fastlane::Helper::Ios::VersionHelper.get_internal_version unless ENV['INTERNAL_CONFIG_FILE'].nil?
  @new_internal_version = Fastlane::Helper::Ios::VersionHelper.create_internal_version(@current_version) unless ENV['INTERNAL_CONFIG_FILE'].nil?
  @new_beta_version = Fastlane::Helper::Ios::VersionHelper.calc_next_build_version(@current_version)
  @short_version = Fastlane::Helper::Ios::VersionHelper.get_short_version_string(@new_beta_version)
end

.descriptionObject



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

def self.description
  'Bumps the version of the app for a new beta'
end

.detailsObject



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

def self.details
  'Bumps the version of the app for a new beta'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


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

def self.is_supported?(platform)
  [:ios, :mac].include?(platform)
end

.outputObject



36
37
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb', line 36

def self.output
end

.return_valueObject



39
40
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb', line 39

def self.return_value
end

.run(params) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb', line 4

def self.run(params)
  UI.message 'Bumping app release version...'

  require_relative '../../helper/ios/ios_git_helper'
  require_relative '../../helper/ios/ios_version_helper'

  Fastlane::Helper::GitHelper.ensure_on_branch!('release')
  create_config
  show_config

  UI.message 'Updating XcConfig...'
  Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_beta_version, @short_version, @new_internal_version)
  UI.message 'Done!'

  Fastlane::Helper::Ios::GitHelper.commit_version_bump
end

.show_configObject



58
59
60
61
62
63
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb', line 58

def self.show_config
  UI.message("Current build version: #{@current_version}")
  UI.message("Current internal version: #{@current_version_internal}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
  UI.message("New beta version: #{@new_beta_version}")
  UI.message("New internal version: #{@new_internal_version}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
end