fastlane-plugin-wpmreleasetoolkit 1.4.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +19 -19
  3. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +5 -10
  4. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb +9 -16
  5. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb +8 -15
  6. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +6 -12
  7. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb +20 -20
  8. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +13 -13
  9. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +2 -8
  10. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb +1 -7
  11. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb +1 -1
  12. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +2 -6
  13. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb +1 -7
  14. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb +1 -7
  15. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb +1 -7
  16. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb +2 -8
  17. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb +1 -1
  18. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/comment_on_pr.rb +89 -0
  19. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_action.rb +3 -1
  20. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +8 -2
  21. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb +10 -5
  22. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +10 -4
  23. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb +115 -0
  24. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_localize_project.rb +5 -6
  25. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/an_metadata_update_helper.rb +1 -1
  26. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb +1 -1
  27. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +33 -68
  28. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/git_helper.rb +5 -0
  29. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +48 -8
  30. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/interactive_prompt_reminder.rb +93 -0
  31. data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +1 -1
  32. metadata +13 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '042749ed354718f17fb9634635f8e3c06a8917d5c69ae3850ea7efd32b8b8725'
4
- data.tar.gz: 3682297f8d2420dab3ecd457214f9ac9675efe13c5abb80673eb748ff6d71c49
3
+ metadata.gz: a9f3fcba792147f476a814f8f67f2620b5c6740497754eb033e2919e25dd3168
4
+ data.tar.gz: 25077b056c019d26adad929b9fffbf942c23f22a60f66892905de241b624b2bb
5
5
  SHA512:
6
- metadata.gz: 5b3f91303cf1b3deff289a87f64fe92e99b71d7f78526ae4e4645691a1e8d6b224b94a66c557adca1989bc6f454d530750c7bb264ad5c0a7278d8bd963b50cbd
7
- data.tar.gz: 91ecfd2fd9ddc7a8fe18823ab23055f708817c3cf9dcfb93e32739b008c737d195ea09035d6f9315eca96cdcc3d3f563da7697e2d086a59ffb0190e35741f9fc
6
+ metadata.gz: d81b6b46eb930e0d15922c08eeea4314e9af06ef356b8dad207a6c76bec0793c1cf4e3c00507c16666170d3f6fe56960c9b3883ca567890e867fb1b50d064adf
7
+ data.tar.gz: a92daf218f3ec9094a0d26edd0f6be4a6062c83609618ccdae26980afe9efd8b10ec6e4192f73290526106f93b6b352c94e55e3944053806ea0d06548ed155c7
@@ -8,24 +8,23 @@ module Fastlane
8
8
  require_relative '../../helper/android/android_version_helper'
9
9
  require_relative '../../helper/android/android_git_helper'
10
10
 
11
- # Checkout develop and update
12
- Fastlane::Helper::GitHelper.checkout_and_pull('develop')
13
-
14
- app = params[:app]
11
+ # Checkout default branch and update
12
+ default_branch = params[:default_branch]
13
+ Fastlane::Helper::GitHelper.checkout_and_pull(default_branch)
15
14
 
16
15
  # Check versions
17
- release_version = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: app)
18
- message = "[#{app}] The following current version has been detected: #{release_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}\n"
19
- alpha_release_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version(app)
20
- message << "[#{app}] The following Alpha version has been detected: #{alpha_release_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}\n" unless alpha_release_version.nil?
16
+ release_version = Fastlane::Helper::Android::VersionHelper.get_release_version
17
+ message = "The following current version has been detected: #{release_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}\n"
18
+ alpha_release_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version
19
+ message << "The following Alpha version has been detected: #{alpha_release_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}\n" unless alpha_release_version.nil?
21
20
 
22
21
  # Check branch
23
- app_version = Fastlane::Helper::Android::VersionHelper.get_public_version(app)
22
+ app_version = Fastlane::Helper::Android::VersionHelper.get_public_version
24
23
  UI.user_error!("#{message}Release branch for version #{app_version} doesn't exist. Abort.") unless !params[:base_version].nil? || Fastlane::Helper::GitHelper.checkout_and_pull(release: app_version)
25
24
 
26
25
  # Check user overwrite
27
26
  unless params[:base_version].nil?
28
- overwrite_version = get_user_build_version(product_name: app, version: params[:base_version], message: message)
27
+ overwrite_version = get_user_build_version(version: params[:base_version], message: message)
29
28
  release_version = overwrite_version[0]
30
29
  alpha_release_version = overwrite_version[1]
31
30
  end
@@ -49,11 +48,11 @@ module Fastlane
49
48
  [next_beta_version, next_alpha_version]
50
49
  end
51
50
 
52
- def self.get_user_build_version(product_name:, version:, message:)
53
- UI.user_error!("[#{app}] Release branch for version #{version} doesn't exist. Abort.") unless Fastlane::Helper::GitHelper.checkout_and_pull(release: version)
54
- release_version = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: product_name)
55
- message << "#{app}] Looking at branch release/#{version} as requested by user. Detected version: #{release_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}.\n"
56
- alpha_release_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version(product_name)
51
+ def self.get_user_build_version(version:, message:)
52
+ UI.user_error!("Release branch for version #{version} doesn't exist. Abort.") unless Fastlane::Helper::GitHelper.checkout_and_pull(release: version)
53
+ release_version = Fastlane::Helper::Android::VersionHelper.get_release_version
54
+ message << "Looking at branch release/#{version} as requested by user. Detected version: #{release_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}.\n"
55
+ alpha_release_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version
57
56
  message << "and Alpha Version: #{alpha_release_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}\n" unless alpha_release_version.nil?
58
57
  [release_version, alpha_release_version]
59
58
  end
@@ -82,10 +81,11 @@ module Fastlane
82
81
  description: 'Skips confirmation',
83
82
  is_string: false, # true: verifies the input is a string, false: every kind of value
84
83
  default_value: false), # the default value if the user didn't provide one
85
- FastlaneCore::ConfigItem.new(key: :app,
86
- env_name: 'PROJECT_NAME',
87
- description: 'The name of the app to get the release version for',
88
- is_string: true), # true: verifies the input is a string, false: every kind of value
84
+ FastlaneCore::ConfigItem.new(key: :default_branch,
85
+ env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',
86
+ description: 'Default branch of the repository',
87
+ type: String,
88
+ default_value: Fastlane::Helper::GitHelper::DEFAULT_GIT_BRANCH),
89
89
  ]
90
90
  end
91
91
 
@@ -9,16 +9,15 @@ module Fastlane
9
9
 
10
10
  Fastlane::Helper::GitHelper.ensure_on_branch!('release') unless other_action.is_ci()
11
11
 
12
- app = params[:app]
13
12
  message = ''
14
- beta_version = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: app) unless !params[:beta] && !params[:final]
15
- alpha_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version(app) if params[:alpha]
13
+ beta_version = Fastlane::Helper::Android::VersionHelper.get_release_version unless !params[:beta] && !params[:final]
14
+ alpha_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version if params[:alpha]
16
15
 
17
16
  UI.user_error!("Can't build a final release out of this branch because it's configured as a beta release!") if params[:final] && Fastlane::Helper::Android::VersionHelper.is_beta_version?(beta_version)
18
17
 
19
- message << "[#{app}] Building version #{beta_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{beta_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}) (for upload to Release Channel)\n" if params[:final]
20
- message << "[#{app}] Building version #{beta_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{beta_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}) (for upload to Beta Channel)\n" if params[:beta]
21
- message << "[#{app}] Building version #{alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}) (for upload to Alpha Channel)\n" if params[:alpha]
18
+ message << "Building version #{beta_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{beta_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}) (for upload to Release Channel)\n" if params[:final]
19
+ message << "Building version #{beta_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{beta_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}) (for upload to Beta Channel)\n" if params[:beta]
20
+ message << "Building version #{alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}) (for upload to Alpha Channel)\n" if params[:alpha]
22
21
 
23
22
  if params[:skip_confirm]
24
23
  UI.message(message)
@@ -64,10 +63,6 @@ module Fastlane
64
63
  description: 'True if this is for a final build',
65
64
  is_string: false,
66
65
  default_value: false),
67
- FastlaneCore::ConfigItem.new(key: :app,
68
- env_name: 'PROJECT_NAME',
69
- description: 'The name of the app to get the release version for',
70
- is_string: true), # true: verifies the input is a string, false: every kind of value
71
66
  ]
72
67
  end
73
68
 
@@ -8,22 +8,21 @@ module Fastlane
8
8
  require_relative '../../helper/android/android_version_helper'
9
9
 
10
10
  Fastlane::Helper::GitHelper.ensure_on_branch!('release')
11
- app = params[:app]
12
11
 
13
- current_version = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: app)
14
- current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version(app)
12
+ current_version = Fastlane::Helper::Android::VersionHelper.get_release_version
13
+ current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version
15
14
  new_version_beta = Fastlane::Helper::Android::VersionHelper.calc_next_beta_version(current_version, current_version_alpha)
16
15
  new_version_alpha = current_version_alpha.nil? ? nil : Fastlane::Helper::Android::VersionHelper.calc_next_alpha_version(new_version_beta, current_version_alpha)
17
16
 
18
17
  vname = Fastlane::Helper::Android::VersionHelper::VERSION_NAME
19
18
  vcode = Fastlane::Helper::Android::VersionHelper::VERSION_CODE
20
- UI.message("Current version[#{app}]: #{current_version[vname]}(#{current_version[vcode]})")
21
- UI.message("Current alpha version[#{app}]: #{current_version_alpha[vname]}(#{current_version_alpha[vcode]})") unless current_version_alpha.nil?
22
- UI.message("New beta version[#{app}]: #{new_version_beta[vname]}(#{new_version_beta[vcode]})")
23
- UI.message("New alpha version[#{app}]: #{new_version_alpha[vname]}(#{new_version_alpha[vcode]})") unless current_version_alpha.nil?
19
+ UI.message("Current version: #{current_version[vname]}(#{current_version[vcode]})")
20
+ UI.message("Current alpha version: #{current_version_alpha[vname]}(#{current_version_alpha[vcode]})") unless current_version_alpha.nil?
21
+ UI.message("New beta version: #{new_version_beta[vname]}(#{new_version_beta[vcode]})")
22
+ UI.message("New alpha version: #{new_version_alpha[vname]}(#{new_version_alpha[vcode]})") unless current_version_alpha.nil?
24
23
 
25
24
  UI.message 'Updating app version...'
26
- Fastlane::Helper::Android::VersionHelper.update_versions(app, new_version_beta, new_version_alpha)
25
+ Fastlane::Helper::Android::VersionHelper.update_versions(new_version_beta, new_version_alpha)
27
26
  UI.message 'Done!'
28
27
 
29
28
  Fastlane::Helper::Android::GitHelper.commit_version_bump()
@@ -34,21 +33,15 @@ module Fastlane
34
33
  #####################################################
35
34
 
36
35
  def self.description
37
- 'Bumps the version of the app for a new beta. Requires the `updateVersionProperties` gradle task to update the keys if you are using a `version.properties` file.'
36
+ 'Bumps the version of the app for a new beta.'
38
37
  end
39
38
 
40
39
  def self.details
41
- 'Bumps the version of the app for a new beta. Requires the `updateVersionProperties` gradle task to update the keys if you are using a `version.properties` file.'
40
+ 'Bumps the version of the app for a new beta.'
42
41
  end
43
42
 
44
43
  def self.available_options
45
44
  # Define all options your action supports.
46
- [
47
- FastlaneCore::ConfigItem.new(key: :app,
48
- env_name: 'PROJECT_NAME',
49
- description: 'The name of the app to get the release version for',
50
- is_string: true), # true: verifies the input is a string, false: every kind of value
51
- ]
52
45
  end
53
46
 
54
47
  def self.output
@@ -8,20 +8,19 @@ module Fastlane
8
8
  require_relative '../../helper/android/android_version_helper'
9
9
 
10
10
  Fastlane::Helper::GitHelper.ensure_on_branch!('release')
11
- app = params[:app]
12
11
 
13
- current_version = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: app)
14
- current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version(app)
12
+ current_version = Fastlane::Helper::Android::VersionHelper.get_release_version
13
+ current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version
15
14
  final_version = Fastlane::Helper::Android::VersionHelper.calc_final_release_version(current_version, current_version_alpha)
16
15
 
17
16
  vname = Fastlane::Helper::Android::VersionHelper::VERSION_NAME
18
17
  vcode = Fastlane::Helper::Android::VersionHelper::VERSION_CODE
19
- UI.message("Current version[#{app}]: #{current_version[vname]}(#{current_version[vcode]})")
20
- UI.message("Current alpha version[#{app}]: #{current_version_alpha[vname]}(#{current_version_alpha[vcode]})") unless current_version_alpha.nil?
21
- UI.message("New release version[#{app}]: #{final_version[vname]}(#{final_version[vcode]})")
18
+ UI.message("Current version: #{current_version[vname]}(#{current_version[vcode]})")
19
+ UI.message("Current alpha version: #{current_version_alpha[vname]}(#{current_version_alpha[vcode]})") unless current_version_alpha.nil?
20
+ UI.message("New release version: #{final_version[vname]}(#{final_version[vcode]})")
22
21
 
23
22
  UI.message 'Updating app version...'
24
- Fastlane::Helper::Android::VersionHelper.update_versions(app, final_version, current_version_alpha)
23
+ Fastlane::Helper::Android::VersionHelper.update_versions(final_version, current_version_alpha)
25
24
  UI.message 'Done!'
26
25
 
27
26
  Fastlane::Helper::Android::GitHelper.commit_version_bump()
@@ -32,21 +31,15 @@ module Fastlane
32
31
  #####################################################
33
32
 
34
33
  def self.description
35
- 'Bumps the version of the app for a new beta. Requires the `updateVersionProperties` gradle task to update the keys if you are using a `version.properties` file.'
34
+ 'Bumps the version of the app for a new beta.'
36
35
  end
37
36
 
38
37
  def self.details
39
- 'Bumps the version of the app for a new beta. Requires the `updateVersionProperties` gradle task to update the keys if you are using a `version.properties` file.'
38
+ 'Bumps the version of the app for a new beta.'
40
39
  end
41
40
 
42
41
  def self.available_options
43
42
  # Define all options your action supports.
44
- [
45
- FastlaneCore::ConfigItem.new(key: :app,
46
- env_name: 'PROJECT_NAME',
47
- description: 'The name of the app to get the release version for',
48
- is_string: true), # true: verifies the input is a string, false: every kind of value
49
- ]
50
43
  end
51
44
 
52
45
  def self.authors
@@ -7,20 +7,18 @@ module Fastlane
7
7
  require_relative '../../helper/android/android_git_helper'
8
8
  Fastlane::Helper::GitHelper.create_branch("release/#{params[:version_name]}", from: params[:previous_version_name])
9
9
 
10
- app = params[:app]
11
-
12
- current_version = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: app)
10
+ current_version = Fastlane::Helper::Android::VersionHelper.get_release_version
13
11
  new_version = Fastlane::Helper::Android::VersionHelper.calc_next_hotfix_version(params[:version_name], params[:version_code]) # NOTE: this just puts the name/code values in a tuple, unchanged (no actual calc/bumping)
14
12
  new_release_branch = "release/#{params[:version_name]}"
15
13
 
16
14
  name_key = Fastlane::Helper::Android::VersionHelper::VERSION_NAME
17
15
  code_key = Fastlane::Helper::Android::VersionHelper::VERSION_CODE
18
- UI.message("Current version [#{app}]: #{current_version[name_key]} (#{current_version[code_key]})")
19
- UI.message("New hotfix version[#{app}]: #{new_version[name_key]} (#{new_version[code_key]})")
16
+ UI.message("Current version: #{current_version[name_key]} (#{current_version[code_key]})")
17
+ UI.message("New hotfix version: #{new_version[name_key]} (#{new_version[code_key]})")
20
18
  UI.message("Release branch: #{new_release_branch}")
21
19
 
22
20
  UI.message 'Updating app version...'
23
- Fastlane::Helper::Android::VersionHelper.update_versions(app, new_version, nil)
21
+ Fastlane::Helper::Android::VersionHelper.update_versions(new_version, nil)
24
22
  UI.message 'Done!'
25
23
 
26
24
  Fastlane::Helper::Android::GitHelper.commit_version_bump()
@@ -33,11 +31,11 @@ module Fastlane
33
31
  #####################################################
34
32
 
35
33
  def self.description
36
- 'Bumps the version of the app for a new beta. Requires the `updateVersionProperties` gradle task to update the keys if you are using a `version.properties` file.'
34
+ 'Bumps the version of the app for a new beta.'
37
35
  end
38
36
 
39
37
  def self.details
40
- 'Bumps the version of the app for a new beta. Requires the `updateVersionProperties` gradle task to update the keys if you are using a `version.properties` file.'
38
+ 'Bumps the version of the app for a new beta.'
41
39
  end
42
40
 
43
41
  def self.available_options
@@ -53,10 +51,6 @@ module Fastlane
53
51
  env_name: 'FL_ANDROID_BUMP_VERSION_HOTFIX_PREVIOUS_VERSION',
54
52
  description: 'The version to branch from',
55
53
  is_string: true),
56
- FastlaneCore::ConfigItem.new(key: :app,
57
- env_name: 'PROJECT_NAME',
58
- description: 'The name of the app to get the release version for',
59
- is_string: true),
60
54
  ]
61
55
  end
62
56
 
@@ -8,34 +8,34 @@ module Fastlane
8
8
  require_relative '../../helper/android/android_version_helper'
9
9
  require_relative '../../helper/android/android_git_helper'
10
10
 
11
- other_action.ensure_git_branch(branch: 'develop')
11
+ default_branch = params[:default_branch]
12
+ other_action.ensure_git_branch(branch: default_branch)
12
13
 
13
14
  # Create new configuration
14
- app = params[:app]
15
- new_short_version = Fastlane::Helper::Android::VersionHelper.bump_version_release(app)
15
+ new_short_version = Fastlane::Helper::Android::VersionHelper.bump_version_release
16
16
 
17
- current_version = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: app)
18
- current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version(app)
17
+ current_version = Fastlane::Helper::Android::VersionHelper.get_release_version
18
+ current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version
19
19
  new_version_beta = Fastlane::Helper::Android::VersionHelper.calc_next_release_version(current_version, current_version_alpha)
20
20
  new_version_alpha = current_version_alpha.nil? ? nil : Fastlane::Helper::Android::VersionHelper.calc_next_alpha_version(new_version_beta, current_version_alpha)
21
21
  new_release_branch = "release/#{new_short_version}"
22
22
 
23
23
  vname = Fastlane::Helper::Android::VersionHelper::VERSION_NAME
24
24
  vcode = Fastlane::Helper::Android::VersionHelper::VERSION_CODE
25
- UI.message("Current version[#{app}]: #{current_version[vname]}(#{current_version[vcode]})")
26
- UI.message("Current alpha version[#{app}]: #{current_version_alpha[vname]}(#{current_version_alpha[vcode]})") unless current_version_alpha.nil?
27
- UI.message("New beta version[#{app}]: #{new_version_beta[vname]}(#{new_version_beta[vcode]})")
28
- UI.message("New alpha version[#{app}]: #{new_version_alpha[vname]}(#{new_version_alpha[vcode]})") unless current_version_alpha.nil?
29
- UI.message("New version[#{app}]: #{new_short_version}")
25
+ UI.message("Current version: #{current_version[vname]}(#{current_version[vcode]})")
26
+ UI.message("Current alpha version: #{current_version_alpha[vname]}(#{current_version_alpha[vcode]})") unless current_version_alpha.nil?
27
+ UI.message("New beta version: #{new_version_beta[vname]}(#{new_version_beta[vcode]})")
28
+ UI.message("New alpha version: #{new_version_alpha[vname]}(#{new_version_alpha[vcode]})") unless current_version_alpha.nil?
29
+ UI.message("New version: #{new_short_version}")
30
30
  UI.message("Release branch: #{new_release_branch}")
31
31
 
32
- # Update local develop and branch
32
+ # Update local default branch and create branch from it
33
33
  UI.message 'Creating new branch...'
34
- Fastlane::Helper::GitHelper.create_branch(new_release_branch, from: 'develop')
34
+ Fastlane::Helper::GitHelper.create_branch(new_release_branch, from: default_branch)
35
35
  UI.message 'Done!'
36
36
 
37
37
  UI.message 'Updating app version...'
38
- Fastlane::Helper::Android::VersionHelper.update_versions(app, new_version_beta, new_version_alpha)
38
+ Fastlane::Helper::Android::VersionHelper.update_versions(new_version_beta, new_version_alpha)
39
39
  Fastlane::Helper::Android::GitHelper.commit_version_bump()
40
40
  UI.message 'Done.'
41
41
  end
@@ -45,20 +45,20 @@ module Fastlane
45
45
  #####################################################
46
46
 
47
47
  def self.description
48
- 'Bumps the version of the app for a new beta. Requires the `updateVersionProperties` gradle task to update the keys if you are using a `version.properties` file.'
48
+ 'Bumps the version of the app for a new beta.'
49
49
  end
50
50
 
51
51
  def self.details
52
- 'Bumps the version of the app for a new beta. Requires the `updateVersionProperties` gradle task to update the keys if you are using a `version.properties` file.'
52
+ 'Bumps the version of the app for a new beta.'
53
53
  end
54
54
 
55
55
  def self.available_options
56
- # Define all options your action supports.
57
56
  [
58
- FastlaneCore::ConfigItem.new(key: :app,
59
- env_name: 'PROJECT_NAME',
60
- description: 'The name of the app to get the release version for',
61
- is_string: true), # true: verifies the input is a string, false: every kind of value
57
+ FastlaneCore::ConfigItem.new(key: :default_branch,
58
+ env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',
59
+ description: 'Default branch of the repository',
60
+ type: String,
61
+ default_value: Fastlane::Helper::GitHelper::DEFAULT_GIT_BRANCH),
62
62
  ]
63
63
  end
64
64
 
@@ -11,21 +11,20 @@ module Fastlane
11
11
  require_relative '../../helper/android/android_version_helper'
12
12
  require_relative '../../helper/android/android_git_helper'
13
13
 
14
- # Checkout develop and update
15
- Fastlane::Helper::GitHelper.checkout_and_pull('develop')
16
-
17
- app = params[:app]
14
+ # Checkout default branch and update
15
+ default_branch = params[:default_branch]
16
+ Fastlane::Helper::GitHelper.checkout_and_pull(default_branch)
18
17
 
19
18
  # Create versions
20
- current_version = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: app)
21
- current_alpha_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version(app)
19
+ current_version = Fastlane::Helper::Android::VersionHelper.get_release_version
20
+ current_alpha_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version
22
21
  next_version = Fastlane::Helper::Android::VersionHelper.calc_next_release_version(current_version, current_alpha_version)
23
22
  next_alpha_version = current_alpha_version.nil? ? nil : Fastlane::Helper::Android::VersionHelper.calc_next_alpha_version(next_version, current_alpha_version)
24
23
 
25
24
  no_alpha_version_message = "No alpha version configured. If you wish to configure an alpha version please update version.properties to include an alpha key for this app\n"
26
25
  # Ask user confirmation
27
26
  unless params[:skip_confirm]
28
- confirm_message = "[#{app}]Building a new release branch starting from develop.\nCurrent version is #{current_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]} (#{current_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}).\n"
27
+ confirm_message = "Building a new release branch starting from #{default_branch}.\nCurrent version is #{current_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]} (#{current_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}).\n"
29
28
  confirm_message += current_alpha_version.nil? ? no_alpha_version_message : "Current Alpha version is #{current_alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]} (#{current_alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}).\n"
30
29
  confirm_message += "After codefreeze the new version will be: #{next_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]} (#{next_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}).\n"
31
30
  confirm_message += current_alpha_version.nil? ? '' : "After codefreeze the new Alpha will be: #{next_alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]} (#{next_alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}).\n"
@@ -37,7 +36,7 @@ module Fastlane
37
36
  other_action.ensure_git_status_clean()
38
37
 
39
38
  # Return the current version
40
- Fastlane::Helper::Android::VersionHelper.get_public_version(app)
39
+ Fastlane::Helper::Android::VersionHelper.get_public_version
41
40
  end
42
41
 
43
42
  #####################################################
@@ -49,7 +48,7 @@ module Fastlane
49
48
  end
50
49
 
51
50
  def self.details
52
- 'Updates the develop branch, checks the app version and ensure the branch is clean'
51
+ 'Updates the default branch, checks the app version and ensure the branch is clean'
53
52
  end
54
53
 
55
54
  def self.available_options
@@ -60,10 +59,11 @@ module Fastlane
60
59
  description: 'Skips confirmation before codefreeze',
61
60
  is_string: false, # true: verifies the input is a string, false: every kind of value
62
61
  default_value: false), # the default value if the user didn't provide one
63
- FastlaneCore::ConfigItem.new(key: :app,
64
- env_name: 'PROJECT_NAME',
65
- description: 'The name of the app to get the release version for',
66
- is_string: true), # true: verifies the input is a string, false: every kind of value
62
+ FastlaneCore::ConfigItem.new(key: :default_branch,
63
+ env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',
64
+ description: 'Default branch of the repository',
65
+ type: String,
66
+ default_value: Fastlane::Helper::GitHelper::DEFAULT_GIT_BRANCH),
67
67
  ]
68
68
  end
69
69
 
@@ -9,10 +9,8 @@ module Fastlane
9
9
 
10
10
  UI.user_error!('This is not a release branch. Abort.') unless other_action.git_branch.start_with?('release/')
11
11
 
12
- app = params[:app]
13
-
14
- version = Fastlane::Helper::Android::VersionHelper.get_public_version(app)
15
- message = "Completing code freeze for: [#{app}]#{version}\n"
12
+ version = Fastlane::Helper::Android::VersionHelper.get_public_version
13
+ message = "Completing code freeze for: #{version}\n"
16
14
  unless params[:skip_confirm]
17
15
  UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
18
16
  else
@@ -44,10 +42,6 @@ module Fastlane
44
42
  description: 'Skips confirmation',
45
43
  is_string: false, # true: verifies the input is a string, false: every kind of value
46
44
  default_value: false), # the default value if the user didn't provide one
47
- FastlaneCore::ConfigItem.new(key: :app,
48
- env_name: 'PROJECT_NAME',
49
- description: 'The name of the app to get the release version for',
50
- is_string: true), # true: verifies the input is a string, false: every kind of value
51
45
  ]
52
46
  end
53
47
 
@@ -7,7 +7,7 @@ module Fastlane
7
7
  class AndroidCurrentBranchIsHotfixAction < Action
8
8
  def self.run(params)
9
9
  require_relative '../../helper/android/android_version_helper'
10
- version = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: params[:app])
10
+ version = Fastlane::Helper::Android::VersionHelper.get_release_version
11
11
  Fastlane::Helper::Android::VersionHelper.is_hotfix?(version)
12
12
  end
13
13
 
@@ -25,12 +25,6 @@ module Fastlane
25
25
 
26
26
  def self.available_options
27
27
  # Define all options your action supports.
28
- [
29
- FastlaneCore::ConfigItem.new(key: :app,
30
- env_name: 'PROJECT_NAME',
31
- description: 'The name of the app to get the release version for',
32
- is_string: true), # true: verifies the input is a string, false: every kind of value
33
- ]
34
28
  end
35
29
 
36
30
  def self.output
@@ -27,7 +27,7 @@ module Fastlane
27
27
 
28
28
  def self.details
29
29
  'This action extracts the version of the library which is imported by the client app' \
30
- 'and downloads the request file from the relevant GitHub release'
30
+ 'and downloads the request file from the relevant GitHub release'
31
31
  end
32
32
 
33
33
  def self.available_options
@@ -13,8 +13,8 @@ module Fastlane
13
13
 
14
14
  UI.user_error!('This is not a release branch. Abort.') unless other_action.git_branch.start_with?('release/')
15
15
 
16
- version = Fastlane::Helper::Android::VersionHelper.get_public_version(params[:app])
17
- message = "Finalizing #{params[:app]} release: #{version}\n"
16
+ version = Fastlane::Helper::Android::VersionHelper.get_public_version
17
+ message = "Finalizing release: #{version}\n"
18
18
  if params[:skip_confirm]
19
19
  UI.message(message)
20
20
  else
@@ -49,10 +49,6 @@ module Fastlane
49
49
  description: 'Skips confirmation',
50
50
  is_string: false, # true: verifies the input is a string, false: every kind of value
51
51
  default_value: false), # the default value if the user didn't provide one
52
- FastlaneCore::ConfigItem.new(key: :app,
53
- env_name: 'PROJECT_NAME',
54
- description: 'The name of the app to get the release version for',
55
- is_string: true), # true: verifies the input is a string, false: every kind of value
56
52
  ]
57
53
  end
58
54
 
@@ -3,7 +3,7 @@ module Fastlane
3
3
  class AndroidGetAlphaVersionAction < Action
4
4
  def self.run(params)
5
5
  require_relative '../../helper/android/android_version_helper'
6
- Fastlane::Helper::Android::VersionHelper.get_alpha_version(params[:app])
6
+ Fastlane::Helper::Android::VersionHelper.get_alpha_version
7
7
  end
8
8
 
9
9
  #####################################################
@@ -20,12 +20,6 @@ module Fastlane
20
20
 
21
21
  def self.available_options
22
22
  # Define all options your action supports.
23
- [
24
- FastlaneCore::ConfigItem.new(key: :app,
25
- env_name: 'PROJECT_NAME',
26
- description: 'The name of the app to get the release version for',
27
- is_string: true), # true: verifies the input is a string, false: every kind of value
28
- ]
29
23
  end
30
24
 
31
25
  def self.output
@@ -3,7 +3,7 @@ module Fastlane
3
3
  class AndroidGetAppVersionAction < Action
4
4
  def self.run(params)
5
5
  require_relative '../../helper/android/android_version_helper'
6
- Fastlane::Helper::Android::VersionHelper.get_public_version(params[:app])
6
+ Fastlane::Helper::Android::VersionHelper.get_public_version
7
7
  end
8
8
 
9
9
  #####################################################
@@ -20,12 +20,6 @@ module Fastlane
20
20
 
21
21
  def self.available_options
22
22
  # Define all options your action supports.
23
- [
24
- FastlaneCore::ConfigItem.new(key: :app,
25
- env_name: 'PROJECT_NAME',
26
- description: 'The name of the app to get the release version for',
27
- is_string: true), # true: verifies the input is a string, false: every kind of value
28
- ]
29
23
  end
30
24
 
31
25
  def self.output
@@ -3,7 +3,7 @@ module Fastlane
3
3
  class AndroidGetReleaseVersionAction < Action
4
4
  def self.run(params)
5
5
  require_relative '../../helper/android/android_version_helper'
6
- Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: params[:app])
6
+ Fastlane::Helper::Android::VersionHelper.get_release_version
7
7
  end
8
8
 
9
9
  #####################################################
@@ -20,12 +20,6 @@ module Fastlane
20
20
 
21
21
  def self.available_options
22
22
  # Define all options your action supports.
23
- [
24
- FastlaneCore::ConfigItem.new(key: :app,
25
- env_name: 'PROJECT_NAME',
26
- description: 'The name of the app to get the release version for',
27
- is_string: true), # true: verifies the input is a string, false: every kind of value
28
- ]
29
23
  end
30
24
 
31
25
  def self.output
@@ -5,10 +5,8 @@ module Fastlane
5
5
  require_relative '../../helper/android/android_version_helper'
6
6
  require_relative '../../helper/android/android_git_helper'
7
7
 
8
- app = ENV['PROJECT_NAME'].nil? ? params[:app] : ENV['PROJECT_NAME']
9
-
10
- release_ver = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: app)
11
- alpha_ver = Fastlane::Helper::Android::VersionHelper.get_alpha_version(app)
8
+ release_ver = Fastlane::Helper::Android::VersionHelper.get_release_version
9
+ alpha_ver = Fastlane::Helper::Android::VersionHelper.get_alpha_version
12
10
  Fastlane::Helper::GitHelper.create_tag(release_ver[Fastlane::Helper::Android::VersionHelper::VERSION_NAME])
13
11
  Fastlane::Helper::GitHelper.create_tag(alpha_ver[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]) unless alpha_ver.nil? || (params[:tag_alpha] == false)
14
12
  end
@@ -32,10 +30,6 @@ module Fastlane
32
30
  description: 'True to skip tagging the alpha version',
33
31
  is_string: false,
34
32
  default_value: true),
35
- FastlaneCore::ConfigItem.new(key: :app,
36
- env_name: 'PROJECT_NAME',
37
- description: 'The name of the app to get the release version for',
38
- is_string: true), # true: verifies the input is a string, false: every kind of value
39
33
  ]
40
34
  end
41
35
 
@@ -98,7 +98,7 @@ module Fastlane
98
98
 
99
99
  def self.details
100
100
  'This actions checks the current status of the translations on GlotPress ' \
101
- 'and raises an error if it\'s below the provided threshold'
101
+ 'and raises an error if it\'s below the provided threshold'
102
102
  end
103
103
 
104
104
  def self.available_options