fastlane-plugin-wpmreleasetoolkit 1.0.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/bin/drawText +1 -0
  3. data/ext/drawText/drawText Tests/DigitParsingTests.swift +21 -0
  4. data/ext/drawText/drawText Tests/ExtensionsTests.swift +5 -0
  5. data/ext/drawText/drawText Tests/Info.plist +22 -0
  6. data/ext/drawText/drawText Tests/StylesheetTests.swift +31 -0
  7. data/ext/drawText/drawText Tests/Test Cases/default-stylesheet.txt +10 -0
  8. data/ext/drawText/drawText Tests/Test Cases/external-styles-sample.css +3 -0
  9. data/ext/drawText/drawText Tests/Test Cases/external-styles-test.txt +13 -0
  10. data/ext/drawText/drawText Tests/Test Cases/large-text-block.txt +1 -0
  11. data/ext/drawText/drawText Tests/Test Cases/regular-text-block.txt +2 -0
  12. data/ext/drawText/drawText Tests/Test Cases/rtl-text-block.txt +2 -0
  13. data/ext/drawText/drawText Tests/Test Cases/text-size-adjustment-test.txt +10 -0
  14. data/ext/drawText/drawText Tests/TextImageTests.swift +99 -0
  15. data/ext/drawText/drawText Tests/drawText_Tests.swift +14 -0
  16. data/ext/drawText/drawText.xcodeproj/project.pbxproj +508 -0
  17. data/ext/drawText/drawText.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  18. data/ext/drawText/drawText.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  19. data/ext/drawText/drawText.xcodeproj/xcshareddata/xcschemes/drawText Tests.xcscheme +57 -0
  20. data/ext/drawText/drawText.xcodeproj/xcshareddata/xcschemes/drawText.xcscheme +109 -0
  21. data/ext/drawText/drawText/Assets/style.css +1 -0
  22. data/ext/drawText/drawText/CoreTextStack.swift +113 -0
  23. data/ext/drawText/drawText/Helpers/CommandLineHelpers.swift +36 -0
  24. data/ext/drawText/drawText/Helpers/Extensions.swift +27 -0
  25. data/ext/drawText/drawText/Helpers/FileSystemHelper.swift +24 -0
  26. data/ext/drawText/drawText/Stylesheet.swift +48 -0
  27. data/ext/drawText/drawText/TextImage.swift +100 -0
  28. data/ext/drawText/drawText/main.swift +61 -0
  29. data/ext/drawText/extconf.rb +1 -1
  30. data/ext/drawText/makefile.example +8 -0
  31. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb +3 -3
  32. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +22 -16
  33. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +15 -9
  34. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb +26 -26
  35. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb +27 -24
  36. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +21 -23
  37. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb +31 -40
  38. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +16 -9
  39. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +10 -4
  40. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb +2 -2
  41. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb +10 -2
  42. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb +1 -1
  43. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb +2 -2
  44. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +11 -7
  45. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb +8 -2
  46. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb +8 -2
  47. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb +8 -2
  48. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotifx_prechecks.rb +5 -5
  49. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_merge_translators_strings.rb +1 -1
  50. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb +11 -5
  51. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_metadata.rb +1 -1
  52. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb +3 -3
  53. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_for_toolkit_updates_action.rb +99 -0
  54. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb +147 -0
  55. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/circleci_trigger_job_action.rb +1 -1
  56. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb +1 -1
  57. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb +6 -5
  58. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb +2 -2
  59. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/removebranchprotection_action.rb +3 -3
  60. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setbranchprotection_action.rb +3 -3
  61. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setfrozentag_action.rb +1 -1
  62. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +5 -5
  63. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +4 -4
  64. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb +2 -2
  65. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb +1 -1
  66. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb +5 -5
  67. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +2 -2
  68. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_clear_intermediate_tags.rb +1 -1
  69. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +4 -4
  70. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +5 -5
  71. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_current_branch_is_hotfix.rb +1 -1
  72. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_final_tag.rb +2 -2
  73. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +5 -5
  74. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb +1 -1
  75. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb +1 -1
  76. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_store_app_sizes.rb +1 -1
  77. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotifx_prechecks.rb +5 -5
  78. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb +1 -1
  79. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_localize_project.rb +1 -1
  80. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_merge_translators_strings.rb +4 -4
  81. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb +2 -2
  82. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata.rb +1 -1
  83. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb +3 -3
  84. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb +2 -2
  85. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/an_metadata_update_helper.rb +3 -3
  86. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb +14 -5
  87. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb +11 -2
  88. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +133 -55
  89. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ci_helper.rb +1 -1
  90. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/configure_helper.rb +2 -2
  91. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/encryption_helper.rb +1 -1
  92. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +4 -6
  93. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/glotpress_helper.rb +79 -0
  94. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_adc_app_sizes_helper.rb +3 -3
  95. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_helper.rb +3 -4
  96. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_update_helper.rb +1 -1
  97. data/lib/fastlane/plugin/wpmreleasetoolkit/models/configuration.rb +2 -2
  98. data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +1 -1
  99. metadata +45 -15
@@ -4,13 +4,23 @@ module Fastlane
4
4
  def self.run(params)
5
5
  UI.message 'Bumping app release version for hotfix...'
6
6
 
7
- require_relative '../../helper/android/android_git_helper.rb'
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
- create_config(params[:previous_version_name], params[:version_name], params[:version_code])
10
- show_config()
11
9
 
12
- UI.message 'Updating build.gradle...'
13
- Fastlane::Helper::Android::VersionHelper.update_versions(@new_version, @current_version_alpha)
10
+ app = params[:app]
11
+
12
+ current_version = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: app)
13
+ current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version(app)
14
+ new_version = Fastlane::Helper::Android::VersionHelper.calc_next_hotfix_version(params[:version_name], params[:version_code])
15
+ new_short_version = new_version_name
16
+ new_release_branch = "release/#{new_short_version}"
17
+
18
+ UI.message("Current version[#{app}]: #{current_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{current_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]})")
19
+ UI.message("New hotfix version[#{app}]: #{new_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{new_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]})")
20
+ UI.message("Release branch: #{new_release_branch}")
21
+
22
+ UI.message 'Updating app version...'
23
+ Fastlane::Helper::Android::VersionHelper.update_versions(app, new_version, current_version_alpha)
14
24
  UI.message 'Done!'
15
25
 
16
26
  Fastlane::Helper::Android::GitHelper.commit_version_bump()
@@ -23,11 +33,11 @@ module Fastlane
23
33
  #####################################################
24
34
 
25
35
  def self.description
26
- 'Bumps the version of the app and creates the new release branch'
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.'
27
37
  end
28
38
 
29
39
  def self.details
30
- 'Bumps the version of the app and creates the new release branch'
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.'
31
41
  end
32
42
 
33
43
  def self.available_options
@@ -46,6 +56,10 @@ module Fastlane
46
56
  env_name: 'FL_ANDROID_BUMP_VERSION_HOTFIX_PREVIOUS_VERSION',
47
57
  description: 'The version to branch from',
48
58
  is_string: true), # the default value if the user didn't provide one
59
+ FastlaneCore::ConfigItem.new(key: :app,
60
+ env_name: 'PROJECT_NAME',
61
+ description: 'The name of the app to get the release version for',
62
+ is_string: true), # true: verifies the input is a string, false: every kind of value
49
63
  ]
50
64
  end
51
65
 
@@ -56,22 +70,6 @@ module Fastlane
56
70
  def self.is_supported?(platform)
57
71
  platform == :android
58
72
  end
59
-
60
- private
61
-
62
- def self.create_config(previous_version, new_version_name, new_version_code)
63
- @current_version = Fastlane::Helper::Android::VersionHelper.get_release_version()
64
- @current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version()
65
- @new_version = Fastlane::Helper::Android::VersionHelper.calc_next_hotfix_version(new_version_name, new_version_code)
66
- @new_short_version = new_version_name
67
- @new_release_branch = "release/#{@new_short_version}"
68
- end
69
-
70
- def self.show_config
71
- UI.message("Current version: #{@current_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{@current_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]})")
72
- UI.message("New hotfix version: #{@new_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{@new_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]})")
73
- UI.message("Release branch: #{@new_release_branch}")
74
- end
75
73
  end
76
74
  end
77
75
  end
@@ -5,23 +5,37 @@ module Fastlane
5
5
  # fastlane will take care of reading in the parameter and fetching the environment variable:
6
6
  UI.message 'Bumping app release version...'
7
7
 
8
- require_relative '../../helper/android/android_version_helper.rb'
9
- require_relative '../../helper/android/android_git_helper.rb'
8
+ require_relative '../../helper/android/android_version_helper'
9
+ require_relative '../../helper/android/android_git_helper'
10
10
 
11
11
  other_action.ensure_git_branch(branch: 'develop')
12
12
 
13
13
  # Create new configuration
14
- @new_short_version = Fastlane::Helper::Android::VersionHelper.bump_version_release()
15
- create_config()
16
- show_config()
14
+ app = params[:app]
15
+ new_short_version = Fastlane::Helper::Android::VersionHelper.bump_version_release(app)
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)
19
+ new_version_beta = Fastlane::Helper::Android::VersionHelper.calc_next_release_version(current_version, current_version_alpha)
20
+ new_version_alpha = current_version_alpha.nil? ? nil : Fastlane::Helper::Android::VersionHelper.calc_next_alpha_version(new_version_beta, current_version_alpha)
21
+ new_release_branch = "release/#{new_short_version}"
22
+
23
+ vname = Fastlane::Helper::Android::VersionHelper::VERSION_NAME
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}")
30
+ UI.message("Release branch: #{new_release_branch}")
17
31
 
18
32
  # Update local develop and branch
19
33
  UI.message 'Creating new branch...'
20
- Fastlane::Helper::GitHelper.create_branch(@new_release_branch, from: 'develop')
34
+ Fastlane::Helper::GitHelper.create_branch(new_release_branch, from: 'develop')
21
35
  UI.message 'Done!'
22
36
 
23
- UI.message 'Updating versions...'
24
- Fastlane::Helper::Android::VersionHelper.update_versions(@new_version_beta, @new_version_alpha)
37
+ UI.message 'Updating app version...'
38
+ Fastlane::Helper::Android::VersionHelper.update_versions(app, new_version_beta, new_version_alpha)
25
39
  Fastlane::Helper::Android::GitHelper.commit_version_bump()
26
40
  UI.message 'Done.'
27
41
  end
@@ -31,14 +45,21 @@ module Fastlane
31
45
  #####################################################
32
46
 
33
47
  def self.description
34
- 'Bumps the version of the app and creates the new release branch'
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.'
35
49
  end
36
50
 
37
51
  def self.details
38
- 'Bumps the version of the app and creates the new release branch'
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.'
39
53
  end
40
54
 
41
55
  def self.available_options
56
+ # Define all options your action supports.
57
+ [
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
62
+ ]
42
63
  end
43
64
 
44
65
  def self.output
@@ -54,36 +75,6 @@ module Fastlane
54
75
  def self.is_supported?(platform)
55
76
  platform == :android
56
77
  end
57
-
58
- private
59
-
60
- def self.create_config
61
- @current_version = Fastlane::Helper::Android::VersionHelper.get_release_version()
62
- @current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version()
63
- @new_version_beta = Fastlane::Helper::Android::VersionHelper.calc_next_release_version(@current_version, @current_version_alpha)
64
- @new_version_alpha = ENV['HAS_ALPHA_VERSION'].nil? ? nil : Fastlane::Helper::Android::VersionHelper.calc_next_alpha_version(@new_version_beta, @current_version_alpha)
65
- @new_release_branch = "release/#{@new_short_version}"
66
- end
67
-
68
- def self.show_config
69
- vname = Fastlane::Helper::Android::VersionHelper::VERSION_NAME
70
- vcode = Fastlane::Helper::Android::VersionHelper::VERSION_CODE
71
- UI.message("Current version: #{@current_version[vname]}(#{@current_version[vcode]})")
72
- UI.message("Current alpha version: #{@current_version_alpha[vname]}(#{@current_version_alpha[vcode]})") unless ENV['HAS_ALPHA_VERSION'].nil?
73
- UI.message("New beta version: #{@new_version_beta[vname]}(#{@new_version_beta[vcode]})")
74
- UI.message("New alpha version: #{@new_version_alpha[vname]}(#{@new_version_alpha[vcode]})") unless ENV['HAS_ALPHA_VERSION'].nil?
75
- UI.message("New version: #{@new_short_version}")
76
- UI.message("Release branch: #{@new_release_branch}")
77
- end
78
-
79
- def self.update_glotpress_key
80
- dm_file = ENV['DOWNLOAD_METADATA']
81
- if File.exist?(dm_file)
82
- sh("sed -i '' \"s/let glotPressWhatsNewKey.*/let glotPressWhatsNewKey = \\\"v#{@new_short_version}-whats-new\\\"/\" #{dm_file}")
83
- else
84
- UI.user_error!("Can't find #{dm_file}.")
85
- end
86
- end
87
78
  end
88
79
  end
89
80
  end
@@ -8,24 +8,27 @@ module Fastlane
8
8
  # fastlane will take care of reading in the parameter and fetching the environment variable:
9
9
  UI.message "Skip confirm on code freeze: #{params[:skip_confirm]}"
10
10
 
11
- require_relative '../../helper/android/android_version_helper.rb'
12
- require_relative '../../helper/android/android_git_helper.rb'
11
+ require_relative '../../helper/android/android_version_helper'
12
+ require_relative '../../helper/android/android_git_helper'
13
13
 
14
14
  # Checkout develop and update
15
15
  Fastlane::Helper::GitHelper.checkout_and_pull('develop')
16
16
 
17
+ app = params[:app]
18
+
17
19
  # Create versions
18
- current_version = Fastlane::Helper::Android::VersionHelper.get_release_version
19
- current_alpha_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version
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)
20
22
  next_version = Fastlane::Helper::Android::VersionHelper.calc_next_release_version(current_version, current_alpha_version)
21
- next_alpha_version = ENV['HAS_ALPHA_VERSION'].nil? ? nil : Fastlane::Helper::Android::VersionHelper.calc_next_alpha_version(next_version, current_alpha_version)
23
+ next_alpha_version = current_alpha_version.nil? ? nil : Fastlane::Helper::Android::VersionHelper.calc_next_alpha_version(next_version, current_alpha_version)
22
24
 
25
+ 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"
23
26
  # Ask user confirmation
24
27
  unless params[:skip_confirm]
25
- confirm_message = "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"
26
- confirm_message += ENV['HAS_ALPHA_VERSION'].nil? ? "No alpha version configured.\n" : "Current Alpha version is #{current_alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]} (#{current_alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}).\n"
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"
29
+ 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"
27
30
  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"
28
- confirm_message += ENV['HAS_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"
31
+ 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"
29
32
  confirm_message += 'Do you want to continue?'
30
33
  UI.user_error!('Aborted by user request') unless UI.confirm(confirm_message)
31
34
  end
@@ -34,7 +37,7 @@ module Fastlane
34
37
  other_action.ensure_git_status_clean()
35
38
 
36
39
  # Return the current version
37
- Fastlane::Helper::Android::VersionHelper.get_public_version
40
+ Fastlane::Helper::Android::VersionHelper.get_public_version(app)
38
41
  end
39
42
 
40
43
  #####################################################
@@ -57,6 +60,10 @@ module Fastlane
57
60
  description: 'Skips confirmation before codefreeze',
58
61
  is_string: false, # true: verifies the input is a string, false: every kind of value
59
62
  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
60
67
  ]
61
68
  end
62
69
 
@@ -4,13 +4,15 @@ module Fastlane
4
4
  def self.run(params)
5
5
  UI.message "Skip confirm: #{params[:skip_confirm]}"
6
6
 
7
- require_relative '../../helper/android/android_version_helper.rb'
8
- require_relative '../../helper/android/android_git_helper.rb'
7
+ require_relative '../../helper/android/android_version_helper'
8
+ require_relative '../../helper/android/android_git_helper'
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
- version = Fastlane::Helper::Android::VersionHelper.get_public_version
13
- message = "Completing code freeze for: #{version}\n"
12
+ app = params[:app]
13
+
14
+ version = Fastlane::Helper::Android::VersionHelper.get_public_version(app)
15
+ message = "Completing code freeze for: [#{app}]#{version}\n"
14
16
  unless params[:skip_confirm]
15
17
  UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
16
18
  else
@@ -42,6 +44,10 @@ module Fastlane
42
44
  description: 'Skips confirmation',
43
45
  is_string: false, # true: verifies the input is a string, false: every kind of value
44
46
  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
45
51
  ]
46
52
  end
47
53
 
@@ -2,9 +2,9 @@ module Fastlane
2
2
  module Actions
3
3
  class AndroidCreateXmlReleaseNotesAction < Action
4
4
  def self.run(params)
5
- require_relative '../../helper/android/android_git_helper.rb'
5
+ require_relative '../../helper/android/android_git_helper'
6
6
 
7
- release_notes_path = params[:download_path] + '/release_notes.xml'
7
+ release_notes_path = "#{params[:download_path]}/release_notes.xml"
8
8
  open(release_notes_path, 'w') do |f|
9
9
  params[:locales].each do |loc|
10
10
  puts "Looking for language: #{loc[1]}"
@@ -6,8 +6,9 @@ module Fastlane
6
6
 
7
7
  class AndroidCurrentBranchIsHotfixAction < Action
8
8
  def self.run(params)
9
- require_relative '../../helper/android/android_version_helper.rb'
10
- Fastlane::Helper::Android::VersionHelper.is_hotfix?(Fastlane::Helper::Android::VersionHelper.get_release_version)
9
+ require_relative '../../helper/android/android_version_helper'
10
+ version = Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: params[:app])
11
+ Fastlane::Helper::Android::VersionHelper.is_hotfix?(version)
11
12
  end
12
13
 
13
14
  #####################################################
@@ -23,6 +24,13 @@ module Fastlane
23
24
  end
24
25
 
25
26
  def self.available_options
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
+ ]
26
34
  end
27
35
 
28
36
  def self.output
@@ -2,7 +2,7 @@ module Fastlane
2
2
  module Actions
3
3
  class AndroidDownloadFileByVersionAction < Action
4
4
  def self.run(params)
5
- require_relative '../../helper/android/android_localize_helper.rb'
5
+ require_relative '../../helper/android/android_localize_helper'
6
6
  require_relative '../../helper/github_helper'
7
7
 
8
8
  version = Fastlane::Helper::Android::VersionHelper.get_library_version_from_gradle_config(import_key: params[:import_key])
@@ -4,8 +4,8 @@ module Fastlane
4
4
  module Actions
5
5
  class AndroidDownloadTranslationsAction < Action
6
6
  def self.run(params)
7
- require_relative '../../helper/android/android_localize_helper.rb'
8
- require_relative '../../helper/git_helper.rb'
7
+ require_relative '../../helper/android/android_localize_helper'
8
+ require_relative '../../helper/git_helper'
9
9
 
10
10
  res_dir = File.join(ENV['PROJECT_ROOT_FOLDER'] || '.', params[:res_dir])
11
11
 
@@ -8,17 +8,17 @@ module Fastlane
8
8
  def self.run(params)
9
9
  UI.message "Skip confirm: #{params[:skip_confirm]}"
10
10
 
11
- require_relative '../../helper/android/android_version_helper.rb'
12
- require_relative '../../helper/android/android_git_helper.rb'
11
+ require_relative '../../helper/android/android_version_helper'
12
+ require_relative '../../helper/android/android_git_helper'
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
17
- message = "Finalizing release: #{version}\n"
18
- if !params[:skip_confirm]
19
- UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
20
- else
16
+ version = Fastlane::Helper::Android::VersionHelper.get_public_version(params[:app])
17
+ message = "Finalizing #{params[:app]} release: #{version}\n"
18
+ if params[:skip_confirm]
21
19
  UI.message(message)
20
+ else
21
+ UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
22
22
  end
23
23
 
24
24
  # Check local repo status
@@ -49,6 +49,10 @@ 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
52
56
  ]
53
57
  end
54
58
 
@@ -2,8 +2,8 @@ module Fastlane
2
2
  module Actions
3
3
  class AndroidGetAlphaVersionAction < Action
4
4
  def self.run(params)
5
- require_relative '../../helper/android/android_version_helper.rb'
6
- Fastlane::Helper::Android::VersionHelper.get_alpha_version()
5
+ require_relative '../../helper/android/android_version_helper'
6
+ Fastlane::Helper::Android::VersionHelper.get_alpha_version(params[:app])
7
7
  end
8
8
 
9
9
  #####################################################
@@ -20,6 +20,12 @@ 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
+ ]
23
29
  end
24
30
 
25
31
  def self.output
@@ -2,8 +2,8 @@ module Fastlane
2
2
  module Actions
3
3
  class AndroidGetAppVersionAction < Action
4
4
  def self.run(params)
5
- require_relative '../../helper/android/android_version_helper.rb'
6
- Fastlane::Helper::Android::VersionHelper.get_public_version
5
+ require_relative '../../helper/android/android_version_helper'
6
+ Fastlane::Helper::Android::VersionHelper.get_public_version(params[:app])
7
7
  end
8
8
 
9
9
  #####################################################
@@ -20,6 +20,12 @@ 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
+ ]
23
29
  end
24
30
 
25
31
  def self.output
@@ -2,8 +2,8 @@ module Fastlane
2
2
  module Actions
3
3
  class AndroidGetReleaseVersionAction < Action
4
4
  def self.run(params)
5
- require_relative '../../helper/android/android_version_helper.rb'
6
- Fastlane::Helper::Android::VersionHelper.get_release_version()
5
+ require_relative '../../helper/android/android_version_helper'
6
+ Fastlane::Helper::Android::VersionHelper.get_release_version(product_name: params[:app])
7
7
  end
8
8
 
9
9
  #####################################################
@@ -20,6 +20,12 @@ 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
+ ]
23
29
  end
24
30
 
25
31
  def self.output
@@ -5,8 +5,8 @@ module Fastlane
5
5
  UI.message "Skip confirm: #{params[:skip_confirm]}"
6
6
  UI.message ''
7
7
 
8
- require_relative '../../helper/android/android_version_helper.rb'
9
- require_relative '../../helper/android/android_git_helper.rb'
8
+ require_relative '../../helper/android/android_version_helper'
9
+ require_relative '../../helper/android/android_git_helper'
10
10
 
11
11
  # Evaluate previous tag
12
12
  new_ver = params[:version_name]
@@ -16,10 +16,10 @@ module Fastlane
16
16
  message = "Requested Hotfix version: #{new_ver}\n"
17
17
  message << "Branching from: #{prev_ver}\n"
18
18
 
19
- if !params[:skip_confirm]
20
- UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
21
- else
19
+ if params[:skip_confirm]
22
20
  UI.message(message)
21
+ else
22
+ UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
23
23
  end
24
24
 
25
25
  # Check tags