fastlane-plugin-wpmreleasetoolkit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +339 -0
- data/README.md +38 -0
- data/bin/drawText +19 -0
- data/ext/drawText/extconf.rb +36 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit.rb +16 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/README.md +20 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_localize_libs_action.rb +53 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb +171 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb +63 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +103 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +83 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb +54 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb +69 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb +58 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +77 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb +89 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +79 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +68 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb +63 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb +79 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb +115 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +71 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotifx_prechecks.rb +78 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_merge_translators_strings.rb +106 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb +51 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_metadata.rb +52 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb +56 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/circleci_trigger_job_action.rb +63 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb +56 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb +59 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_action.rb +91 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb +89 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/get_prs_list_action.rb +64 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb +90 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb +170 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb +247 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/removebranchprotection_action.rb +57 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setbranchprotection_action.rb +56 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setfrozentag_action.rb +81 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_add_files_to_copy_action.rb +96 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_apply_action.rb +139 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb +57 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_setup_action.rb +86 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_update_action.rb +139 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_validate_action.rb +134 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb +77 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb +79 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +92 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +74 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb +78 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb +68 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb +87 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb +114 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +62 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_clear_intermediate_tags.rb +60 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +70 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +63 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_current_branch_is_hotfix.rb +40 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_final_tag.rb +52 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +64 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb +47 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb +60 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_store_app_sizes.rb +121 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotifx_prechecks.rb +78 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb +167 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_localize_project.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_merge_translators_strings.rb +93 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata.rb +40 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb +81 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb +56 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb +46 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/an_metadata_update_helper.rb +152 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb +359 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +475 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ci_helper.rb +91 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/configure_helper.rb +282 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/encryption_helper.rb +51 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/filesystem_helper.rb +93 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/git_helper.rb +224 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +135 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_adc_app_sizes_helper.rb +74 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb +80 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_helper.rb +208 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb +348 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_download_helper.rb +107 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_update_helper.rb +182 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb +399 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/release_notes_helper.rb +21 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/configuration.rb +40 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/file_reference.rb +86 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +5 -0
- metadata +449 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
module Fastlane
|
|
2
|
+
module Actions
|
|
3
|
+
class AndroidBuildPreflightAction < Action
|
|
4
|
+
def self.run(params)
|
|
5
|
+
# Validate mobile configuration secrets
|
|
6
|
+
other_action.configure_apply
|
|
7
|
+
|
|
8
|
+
# Check gems and pods are up to date. This will exit if it fails
|
|
9
|
+
begin
|
|
10
|
+
Action.sh('bundle check')
|
|
11
|
+
rescue
|
|
12
|
+
UI.user_error!("You should run 'bundle install' to make sure gems are up to date")
|
|
13
|
+
raise
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
begin
|
|
17
|
+
Action.sh('command -v bundletool > /dev/null')
|
|
18
|
+
rescue
|
|
19
|
+
UI.user_error!("bundletool is required to build the APKs. Install it with 'brew install bundletool'")
|
|
20
|
+
raise
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
#####################################################
|
|
25
|
+
# @!group Documentation
|
|
26
|
+
#####################################################
|
|
27
|
+
|
|
28
|
+
def self.description
|
|
29
|
+
'Clean the environment to ensure a safe build'
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.details
|
|
33
|
+
'Clean the environment to ensure a safe build'
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.available_options
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.output
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def self.return_value
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.authors
|
|
46
|
+
['loremattei']
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def self.is_supported?(platform)
|
|
50
|
+
platform == :android
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
module Fastlane
|
|
2
|
+
module Actions
|
|
3
|
+
class AndroidBumpVersionBetaAction < Action
|
|
4
|
+
def self.run(params)
|
|
5
|
+
UI.message 'Bumping app release version...'
|
|
6
|
+
|
|
7
|
+
require_relative '../../helper/android/android_git_helper.rb'
|
|
8
|
+
require_relative '../../helper/android/android_version_helper.rb'
|
|
9
|
+
|
|
10
|
+
Fastlane::Helper::GitHelper.ensure_on_branch!('release')
|
|
11
|
+
create_config()
|
|
12
|
+
show_config()
|
|
13
|
+
|
|
14
|
+
UI.message 'Updating build.gradle...'
|
|
15
|
+
Fastlane::Helper::Android::VersionHelper.update_versions(@new_version_beta, @new_version_alpha)
|
|
16
|
+
UI.message 'Done!'
|
|
17
|
+
|
|
18
|
+
Fastlane::Helper::Android::GitHelper.commit_version_bump()
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
#####################################################
|
|
22
|
+
# @!group Documentation
|
|
23
|
+
#####################################################
|
|
24
|
+
|
|
25
|
+
def self.description
|
|
26
|
+
'Bumps the version of the app for a new beta'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.details
|
|
30
|
+
'Bumps the version of the app for a new beta'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.available_options
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.output
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.return_value
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def self.authors
|
|
43
|
+
['loremattei']
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def self.is_supported?(platform)
|
|
47
|
+
platform == :android
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
private
|
|
51
|
+
|
|
52
|
+
def self.create_config
|
|
53
|
+
@current_version = Fastlane::Helper::Android::VersionHelper.get_release_version()
|
|
54
|
+
@current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version()
|
|
55
|
+
@new_version_beta = Fastlane::Helper::Android::VersionHelper.calc_next_beta_version(@current_version, @current_version_alpha)
|
|
56
|
+
@new_version_alpha = ENV['HAS_ALPHA_VERSION'].nil? ? nil : Fastlane::Helper::Android::VersionHelper.calc_next_alpha_version(@new_version_beta, @current_version_alpha)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def self.show_config
|
|
60
|
+
vname = Fastlane::Helper::Android::VersionHelper::VERSION_NAME
|
|
61
|
+
vcode = Fastlane::Helper::Android::VersionHelper::VERSION_CODE
|
|
62
|
+
UI.message("Current version: #{@current_version[vname]}(#{@current_version[vcode]})")
|
|
63
|
+
UI.message("Current alpha version: #{@current_version_alpha[vname]}(#{@current_version_alpha[vcode]})") unless ENV['HAS_ALPHA_VERSION'].nil?
|
|
64
|
+
UI.message("New beta version: #{@new_version_beta[vname]}(#{@new_version_beta[vcode]})")
|
|
65
|
+
UI.message("New alpha version: #{@new_version_alpha[vname]}(#{@new_version_alpha[vcode]})") unless ENV['HAS_ALPHA_VERSION'].nil?
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
module Fastlane
|
|
2
|
+
module Actions
|
|
3
|
+
class AndroidBumpVersionFinalReleaseAction < Action
|
|
4
|
+
def self.run(params)
|
|
5
|
+
UI.message 'Bumping app release version...'
|
|
6
|
+
|
|
7
|
+
require_relative '../../helper/android/android_git_helper.rb'
|
|
8
|
+
require_relative '../../helper/android/android_version_helper.rb'
|
|
9
|
+
|
|
10
|
+
Fastlane::Helper::GitHelper.ensure_on_branch!('release')
|
|
11
|
+
create_config()
|
|
12
|
+
show_config()
|
|
13
|
+
|
|
14
|
+
UI.message 'Updating gradle.properties...'
|
|
15
|
+
Fastlane::Helper::Android::VersionHelper.update_versions(@final_version, @current_version_alpha)
|
|
16
|
+
UI.message 'Done!'
|
|
17
|
+
|
|
18
|
+
Fastlane::Helper::Android::GitHelper.commit_version_bump()
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
#####################################################
|
|
22
|
+
# @!group Documentation
|
|
23
|
+
#####################################################
|
|
24
|
+
|
|
25
|
+
def self.description
|
|
26
|
+
'Bumps the version of the app for a new beta'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.details
|
|
30
|
+
'Bumps the version of the app for a new beta'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.authors
|
|
34
|
+
['loremattei']
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def self.is_supported?(platform)
|
|
38
|
+
platform == :android
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
private
|
|
42
|
+
|
|
43
|
+
def self.create_config
|
|
44
|
+
@current_version = Fastlane::Helper::Android::VersionHelper.get_release_version()
|
|
45
|
+
@current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version()
|
|
46
|
+
@final_version = Fastlane::Helper::Android::VersionHelper.calc_final_release_version(@current_version, @current_version_alpha)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def self.show_config
|
|
50
|
+
vname = Fastlane::Helper::Android::VersionHelper::VERSION_NAME
|
|
51
|
+
vcode = Fastlane::Helper::Android::VersionHelper::VERSION_CODE
|
|
52
|
+
UI.message("Current version: #{@current_version[vname]}(#{@current_version[vcode]})")
|
|
53
|
+
UI.message("Current alpha version: #{@current_version_alpha[vname]}(#{@current_version_alpha[vcode]})") unless ENV['HAS_ALPHA_VERSION'].nil?
|
|
54
|
+
UI.message("New release version: #{@final_version[vname]}(#{@final_version[vcode]})")
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
module Fastlane
|
|
2
|
+
module Actions
|
|
3
|
+
class AndroidBumpVersionHotfixAction < Action
|
|
4
|
+
def self.run(params)
|
|
5
|
+
UI.message 'Bumping app release version for hotfix...'
|
|
6
|
+
|
|
7
|
+
require_relative '../../helper/android/android_git_helper.rb'
|
|
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
|
+
|
|
12
|
+
UI.message 'Updating build.gradle...'
|
|
13
|
+
Fastlane::Helper::Android::VersionHelper.update_versions(@new_version, @current_version_alpha)
|
|
14
|
+
UI.message 'Done!'
|
|
15
|
+
|
|
16
|
+
Fastlane::Helper::Android::GitHelper.commit_version_bump()
|
|
17
|
+
|
|
18
|
+
UI.message 'Done.'
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
#####################################################
|
|
22
|
+
# @!group Documentation
|
|
23
|
+
#####################################################
|
|
24
|
+
|
|
25
|
+
def self.description
|
|
26
|
+
'Bumps the version of the app and creates the new release branch'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.details
|
|
30
|
+
'Bumps the version of the app and creates the new release branch'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.available_options
|
|
34
|
+
# Define all options your action supports.
|
|
35
|
+
|
|
36
|
+
# Below a few examples
|
|
37
|
+
[
|
|
38
|
+
FastlaneCore::ConfigItem.new(key: :version_name,
|
|
39
|
+
env_name: 'FL_ANDROID_BUMP_VERSION_HOTFIX_VERSION',
|
|
40
|
+
description: 'The version of the hotfix',
|
|
41
|
+
is_string: true),
|
|
42
|
+
FastlaneCore::ConfigItem.new(key: :version_code,
|
|
43
|
+
env_name: 'FL_ANDROID_BUMP_VERSION_HOTFIX_CODE',
|
|
44
|
+
description: 'The version of the hotfix'),
|
|
45
|
+
FastlaneCore::ConfigItem.new(key: :previous_version_name,
|
|
46
|
+
env_name: 'FL_ANDROID_BUMP_VERSION_HOTFIX_PREVIOUS_VERSION',
|
|
47
|
+
description: 'The version to branch from',
|
|
48
|
+
is_string: true), # the default value if the user didn't provide one
|
|
49
|
+
]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def self.authors
|
|
53
|
+
['loremattei']
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def self.is_supported?(platform)
|
|
57
|
+
platform == :android
|
|
58
|
+
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
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
module Fastlane
|
|
2
|
+
module Actions
|
|
3
|
+
class AndroidBumpVersionReleaseAction < Action
|
|
4
|
+
def self.run(params)
|
|
5
|
+
# fastlane will take care of reading in the parameter and fetching the environment variable:
|
|
6
|
+
UI.message 'Bumping app release version...'
|
|
7
|
+
|
|
8
|
+
require_relative '../../helper/android/android_version_helper.rb'
|
|
9
|
+
require_relative '../../helper/android/android_git_helper.rb'
|
|
10
|
+
|
|
11
|
+
other_action.ensure_git_branch(branch: 'develop')
|
|
12
|
+
|
|
13
|
+
# Create new configuration
|
|
14
|
+
@new_short_version = Fastlane::Helper::Android::VersionHelper.bump_version_release()
|
|
15
|
+
create_config()
|
|
16
|
+
show_config()
|
|
17
|
+
|
|
18
|
+
# Update local develop and branch
|
|
19
|
+
UI.message 'Creating new branch...'
|
|
20
|
+
Fastlane::Helper::GitHelper.create_branch(@new_release_branch, from: 'develop')
|
|
21
|
+
UI.message 'Done!'
|
|
22
|
+
|
|
23
|
+
UI.message 'Updating versions...'
|
|
24
|
+
Fastlane::Helper::Android::VersionHelper.update_versions(@new_version_beta, @new_version_alpha)
|
|
25
|
+
Fastlane::Helper::Android::GitHelper.commit_version_bump()
|
|
26
|
+
UI.message 'Done.'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
#####################################################
|
|
30
|
+
# @!group Documentation
|
|
31
|
+
#####################################################
|
|
32
|
+
|
|
33
|
+
def self.description
|
|
34
|
+
'Bumps the version of the app and creates the new release branch'
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def self.details
|
|
38
|
+
'Bumps the version of the app and creates the new release branch'
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.available_options
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def self.output
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def self.return_value
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def self.authors
|
|
51
|
+
['loremattei']
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def self.is_supported?(platform)
|
|
55
|
+
platform == :android
|
|
56
|
+
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
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
module Fastlane
|
|
2
|
+
module Actions
|
|
3
|
+
class AndroidCodefreezePrechecksAction < Action
|
|
4
|
+
VERSION_RELEASE = 'release'
|
|
5
|
+
VERSION_ALPHA = 'alpha'
|
|
6
|
+
|
|
7
|
+
def self.run(params)
|
|
8
|
+
# fastlane will take care of reading in the parameter and fetching the environment variable:
|
|
9
|
+
UI.message "Skip confirm on code freeze: #{params[:skip_confirm]}"
|
|
10
|
+
|
|
11
|
+
require_relative '../../helper/android/android_version_helper.rb'
|
|
12
|
+
require_relative '../../helper/android/android_git_helper.rb'
|
|
13
|
+
|
|
14
|
+
# Checkout develop and update
|
|
15
|
+
Fastlane::Helper::GitHelper.checkout_and_pull('develop')
|
|
16
|
+
|
|
17
|
+
# Create versions
|
|
18
|
+
current_version = Fastlane::Helper::Android::VersionHelper.get_release_version
|
|
19
|
+
current_alpha_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version
|
|
20
|
+
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)
|
|
22
|
+
|
|
23
|
+
# Ask user confirmation
|
|
24
|
+
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"
|
|
27
|
+
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"
|
|
29
|
+
confirm_message += 'Do you want to continue?'
|
|
30
|
+
UI.user_error!('Aborted by user request') unless UI.confirm(confirm_message)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Check local repo status
|
|
34
|
+
other_action.ensure_git_status_clean()
|
|
35
|
+
|
|
36
|
+
# Return the current version
|
|
37
|
+
Fastlane::Helper::Android::VersionHelper.get_public_version
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
#####################################################
|
|
41
|
+
# @!group Documentation
|
|
42
|
+
#####################################################
|
|
43
|
+
|
|
44
|
+
def self.description
|
|
45
|
+
'Runs some prechecks before code freeze'
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def self.details
|
|
49
|
+
'Updates the develop branch, checks the app version and ensure the branch is clean'
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def self.available_options
|
|
53
|
+
# Define all options your action supports.
|
|
54
|
+
[
|
|
55
|
+
FastlaneCore::ConfigItem.new(key: :skip_confirm,
|
|
56
|
+
env_name: 'FL_ANDROID_CODEFREEZE_PRECHECKS_SKIPCONFIRM',
|
|
57
|
+
description: 'Skips confirmation before codefreeze',
|
|
58
|
+
is_string: false, # true: verifies the input is a string, false: every kind of value
|
|
59
|
+
default_value: false), # the default value if the user didn't provide one
|
|
60
|
+
]
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def self.output
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def self.return_value
|
|
67
|
+
'Version of the app before code freeze'
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def self.authors
|
|
71
|
+
['loremattei']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def self.is_supported?(platform)
|
|
75
|
+
platform == :android
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
module Fastlane
|
|
2
|
+
module Actions
|
|
3
|
+
class AndroidCompletecodefreezePrechecksAction < Action
|
|
4
|
+
def self.run(params)
|
|
5
|
+
UI.message "Skip confirm: #{params[:skip_confirm]}"
|
|
6
|
+
|
|
7
|
+
require_relative '../../helper/android/android_version_helper.rb'
|
|
8
|
+
require_relative '../../helper/android/android_git_helper.rb'
|
|
9
|
+
|
|
10
|
+
UI.user_error!('This is not a release branch. Abort.') unless other_action.git_branch.start_with?('release/')
|
|
11
|
+
|
|
12
|
+
version = Fastlane::Helper::Android::VersionHelper.get_public_version
|
|
13
|
+
message = "Completing code freeze for: #{version}\n"
|
|
14
|
+
unless params[:skip_confirm]
|
|
15
|
+
UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
|
|
16
|
+
else
|
|
17
|
+
UI.message(message)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Check local repo status
|
|
21
|
+
other_action.ensure_git_status_clean()
|
|
22
|
+
|
|
23
|
+
version
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
#####################################################
|
|
27
|
+
# @!group Documentation
|
|
28
|
+
#####################################################
|
|
29
|
+
|
|
30
|
+
def self.description
|
|
31
|
+
'Runs some prechecks before finalizing a code freeze'
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def self.details
|
|
35
|
+
'Runs some prechecks before finalizing a code freeze'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.available_options
|
|
39
|
+
[
|
|
40
|
+
FastlaneCore::ConfigItem.new(key: :skip_confirm,
|
|
41
|
+
env_name: 'FL_ANDROID_COMPLETECODEFREEZE_PRECHECKS_SKIPCONFIRM',
|
|
42
|
+
description: 'Skips confirmation',
|
|
43
|
+
is_string: false, # true: verifies the input is a string, false: every kind of value
|
|
44
|
+
default_value: false), # the default value if the user didn't provide one
|
|
45
|
+
]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def self.output
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def self.return_type
|
|
52
|
+
:string
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def self.return_value
|
|
56
|
+
'The version number that has been prechecked.'
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def self.authors
|
|
60
|
+
['loremattei']
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def self.is_supported?(platform)
|
|
64
|
+
platform == :android
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|