fastlane-plugin-wpmreleasetoolkit 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,74 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class IosBuildPrechecksAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
require_relative '../../helper/ios/ios_version_helper.rb'
|
6
|
+
|
7
|
+
message = ''
|
8
|
+
message << "Building version #{Fastlane::Helper::Ios::VersionHelper.get_internal_version()} and uploading to App Center\n" if params[:internal]
|
9
|
+
message << "Building version #{Fastlane::Helper::Ios::VersionHelper.get_build_version()} and uploading to App Center\n" if params[:internal_on_single_version]
|
10
|
+
message << "Building version #{Fastlane::Helper::Ios::VersionHelper.get_build_version()} and uploading to TestFlight\n" if params[:external]
|
11
|
+
|
12
|
+
if !params[:skip_confirm]
|
13
|
+
UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
|
14
|
+
else
|
15
|
+
UI.message(message)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Check local repo status
|
19
|
+
other_action.ensure_git_status_clean() unless other_action.is_ci()
|
20
|
+
end
|
21
|
+
|
22
|
+
#####################################################
|
23
|
+
# @!group Documentation
|
24
|
+
#####################################################
|
25
|
+
|
26
|
+
def self.description
|
27
|
+
'Runs some prechecks before the build'
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.details
|
31
|
+
'Runs some prechecks before the build'
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.available_options
|
35
|
+
[
|
36
|
+
FastlaneCore::ConfigItem.new(key: :skip_confirm,
|
37
|
+
env_name: 'FL_IOS_BUILD_PRECHECKS_SKIP_CONFIRM',
|
38
|
+
description: 'True to avoid the system ask for confirmation',
|
39
|
+
is_string: false,
|
40
|
+
default_value: false),
|
41
|
+
FastlaneCore::ConfigItem.new(key: :internal,
|
42
|
+
env_name: 'FL_IOS_BUILD_PRECHECKS_INTERNAL_BUILD',
|
43
|
+
description: 'True if this is for an internal build',
|
44
|
+
is_string: false,
|
45
|
+
default_value: false),
|
46
|
+
FastlaneCore::ConfigItem.new(key: :external,
|
47
|
+
env_name: 'FL_IOS_BUILD_PRECHECKS_EXTERNAL_BUILD',
|
48
|
+
description: 'True if this is for a public build',
|
49
|
+
is_string: false,
|
50
|
+
default_value: false),
|
51
|
+
FastlaneCore::ConfigItem.new(key: :internal_on_single_version,
|
52
|
+
env_name: 'FL_IOS_BUILD_PRECHECKS_INTERNAL_SV_BUILD',
|
53
|
+
description: 'True if this is for an internal build that follows the same versioning of the external',
|
54
|
+
is_string: false,
|
55
|
+
default_value: false),
|
56
|
+
]
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.output
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.return_value
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.authors
|
66
|
+
['loremattei']
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.is_supported?(platform)
|
70
|
+
platform == :ios
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class IosBuildPreflightAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
# Validate mobile configuration secrets
|
6
|
+
other_action.configure_apply
|
7
|
+
|
8
|
+
Action.sh("cd .. && rm -rf #{params[:derived_data_path]}")
|
9
|
+
|
10
|
+
# Verify that ImageMagick exists on this machine and can be called from the command-line.
|
11
|
+
# Internal Builds use it to generate the App Icon as part of the build process
|
12
|
+
begin
|
13
|
+
Action.sh('which convert')
|
14
|
+
rescue
|
15
|
+
UI.user_error!("Couldn't find ImageMagick. Please install it by running `brew install imagemagick`")
|
16
|
+
raise
|
17
|
+
end
|
18
|
+
|
19
|
+
# Verify that Ghostscript exists on this machine and can be called from the command-line.
|
20
|
+
# Internal Builds use it to generate the App Icon as part of the build process
|
21
|
+
begin
|
22
|
+
Action.sh('which gs')
|
23
|
+
rescue
|
24
|
+
UI.user_error!("Couldn't find Ghostscript. Please install it by running `brew install ghostscript`")
|
25
|
+
raise
|
26
|
+
end
|
27
|
+
|
28
|
+
# Check gems and pods are up to date. This will exit if it fails
|
29
|
+
begin
|
30
|
+
Action.sh('bundle check')
|
31
|
+
rescue
|
32
|
+
UI.user_error!("You should run 'rake dependencies' to make sure gems are up to date")
|
33
|
+
raise
|
34
|
+
end
|
35
|
+
|
36
|
+
Action.sh('rake dependencies:pod:clean')
|
37
|
+
other_action.cocoapods()
|
38
|
+
end
|
39
|
+
|
40
|
+
#####################################################
|
41
|
+
# @!group Documentation
|
42
|
+
#####################################################
|
43
|
+
|
44
|
+
def self.description
|
45
|
+
'Clean the environment to ensure a safe build'
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.details
|
49
|
+
'Clean the environment to ensure a safe build'
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.available_options
|
53
|
+
[
|
54
|
+
FastlaneCore::ConfigItem.new(
|
55
|
+
key: :derived_data_path,
|
56
|
+
description: "The path to the DerivedData directory for the project. Should match what's used in the `gym` action",
|
57
|
+
is_string: true,
|
58
|
+
default_value: '~/Library/Developer/Xcode/DerivedData'
|
59
|
+
),
|
60
|
+
]
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.output
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.return_value
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.authors
|
70
|
+
['loremattei']
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.is_supported?(platform)
|
74
|
+
platform == :ios
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class IosBumpVersionBetaAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
UI.message 'Bumping app release version...'
|
6
|
+
|
7
|
+
require_relative '../../helper/ios/ios_git_helper.rb'
|
8
|
+
require_relative '../../helper/ios/ios_version_helper.rb'
|
9
|
+
|
10
|
+
Fastlane::Helper::GitHelper.ensure_on_branch!('release')
|
11
|
+
create_config()
|
12
|
+
show_config()
|
13
|
+
|
14
|
+
UI.message 'Updating XcConfig...'
|
15
|
+
Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_beta_version, @short_version, @new_internal_version)
|
16
|
+
UI.message 'Done!'
|
17
|
+
|
18
|
+
Fastlane::Helper::Ios::GitHelper.commit_version_bump(include_deliverfile: false, include_metadata: false)
|
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 == :ios
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
def self.create_config
|
53
|
+
@current_version = Fastlane::Helper::Ios::VersionHelper.get_build_version()
|
54
|
+
@current_version_internal = Fastlane::Helper::Ios::VersionHelper.get_internal_version() unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
55
|
+
@new_internal_version = Fastlane::Helper::Ios::VersionHelper.create_internal_version(@current_version) unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
56
|
+
@new_beta_version = Fastlane::Helper::Ios::VersionHelper.calc_next_build_version(@current_version)
|
57
|
+
@short_version = Fastlane::Helper::Ios::VersionHelper.get_short_version_string(@new_beta_version)
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.show_config
|
61
|
+
UI.message("Current build version: #{@current_version}")
|
62
|
+
UI.message("Current internal version: #{@current_version_internal}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
63
|
+
UI.message("New beta version: #{@new_beta_version}")
|
64
|
+
UI.message("New internal version: #{@new_internal_version}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class IosBumpVersionHotfixAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
UI.message 'Bumping app release version for hotfix...'
|
6
|
+
|
7
|
+
require_relative '../../helper/ios/ios_git_helper.rb'
|
8
|
+
Fastlane::Helper::GitHelper.create_branch("release/#{params[:version]}", from: params[:previous_version])
|
9
|
+
create_config(params[:previous_version], params[:version])
|
10
|
+
show_config()
|
11
|
+
|
12
|
+
UI.message 'Updating Fastlane deliver file...'
|
13
|
+
Fastlane::Helper::Ios::VersionHelper.update_fastlane_deliver(@new_short_version)
|
14
|
+
UI.message 'Done!'
|
15
|
+
UI.message 'Updating XcConfig...'
|
16
|
+
Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_version, @new_short_version, @new_version_internal)
|
17
|
+
UI.message 'Done!'
|
18
|
+
|
19
|
+
Fastlane::Helper::Ios::GitHelper.commit_version_bump(include_deliverfile: true, include_metadata: false)
|
20
|
+
|
21
|
+
UI.message 'Done.'
|
22
|
+
end
|
23
|
+
|
24
|
+
#####################################################
|
25
|
+
# @!group Documentation
|
26
|
+
#####################################################
|
27
|
+
|
28
|
+
def self.description
|
29
|
+
'Bumps the version of the app and creates the new release branch'
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.details
|
33
|
+
'Bumps the version of the app and creates the new release branch'
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.available_options
|
37
|
+
# Define all options your action supports.
|
38
|
+
|
39
|
+
# Below a few examples
|
40
|
+
[
|
41
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
42
|
+
env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_VERSION',
|
43
|
+
description: 'The version of the hotfix',
|
44
|
+
is_string: true),
|
45
|
+
FastlaneCore::ConfigItem.new(key: :previous_version,
|
46
|
+
env_name: 'FL_IOS_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.output
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.return_value
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.authors
|
59
|
+
['loremattei']
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.is_supported?(platform)
|
63
|
+
platform == :ios
|
64
|
+
end
|
65
|
+
|
66
|
+
private
|
67
|
+
|
68
|
+
def self.create_config(previous_version, new_short_version)
|
69
|
+
@current_version = previous_version
|
70
|
+
@current_version_internal = Fastlane::Helper::Ios::VersionHelper.get_internal_version() unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
71
|
+
@new_version = "#{new_short_version}.0"
|
72
|
+
@new_version_internal = Fastlane::Helper::Ios::VersionHelper.create_internal_version(@new_version) unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
73
|
+
@new_short_version = new_short_version
|
74
|
+
@new_release_branch = "release/#{@new_short_version}"
|
75
|
+
end
|
76
|
+
|
77
|
+
def self.show_config
|
78
|
+
UI.message("Current build version: #{@current_version}")
|
79
|
+
UI.message("Current internal version: #{@current_version_internal}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
80
|
+
UI.message("New build version: #{@new_version}")
|
81
|
+
UI.message("New internal version: #{@new_version_internal}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
82
|
+
UI.message("New short version: #{@new_short_version}")
|
83
|
+
UI.message("Release branch: #{@new_release_branch}")
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class IosBumpVersionReleaseAction < 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/ios/ios_version_helper.rb'
|
9
|
+
require_relative '../../helper/ios/ios_git_helper.rb'
|
10
|
+
|
11
|
+
other_action.ensure_git_branch(branch: 'develop')
|
12
|
+
|
13
|
+
# Create new configuration
|
14
|
+
@new_version = Fastlane::Helper::Ios::VersionHelper.bump_version_release()
|
15
|
+
create_config()
|
16
|
+
show_config()
|
17
|
+
|
18
|
+
# Update local develop and branch
|
19
|
+
Fastlane::Helper::GitHelper.checkout_and_pull('develop')
|
20
|
+
Fastlane::Helper::GitHelper.create_branch(@new_release_branch, from: 'develop')
|
21
|
+
UI.message 'Done!'
|
22
|
+
|
23
|
+
UI.message 'Updating glotPressKeys...' unless params[:skip_glotpress]
|
24
|
+
update_glotpress_key unless params [:skip_glotpress]
|
25
|
+
UI.message 'Done' unless params [:skip_glotpress]
|
26
|
+
|
27
|
+
UI.message 'Updating Fastlane deliver file...' unless params[:skip_deliver]
|
28
|
+
Fastlane::Helper::Ios::VersionHelper.update_fastlane_deliver(@new_short_version) unless params[:skip_deliver]
|
29
|
+
UI.message 'Done!' unless params [:skip_deliver]
|
30
|
+
|
31
|
+
UI.message 'Updating XcConfig...'
|
32
|
+
Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_version, @new_short_version, @new_version_internal)
|
33
|
+
UI.message 'Done!'
|
34
|
+
|
35
|
+
Fastlane::Helper::Ios::GitHelper.commit_version_bump(
|
36
|
+
include_deliverfile: !params[:skip_deliver],
|
37
|
+
include_metadata: !params[:skip_glotpress]
|
38
|
+
)
|
39
|
+
|
40
|
+
UI.message 'Done.'
|
41
|
+
end
|
42
|
+
|
43
|
+
#####################################################
|
44
|
+
# @!group Documentation
|
45
|
+
#####################################################
|
46
|
+
|
47
|
+
def self.description
|
48
|
+
'Bumps the version of the app and creates the new release branch'
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.details
|
52
|
+
'Bumps the version of the app and creates the new release branch'
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.available_options
|
56
|
+
[
|
57
|
+
FastlaneCore::ConfigItem.new(key: :skip_glotpress,
|
58
|
+
env_name: 'FL_IOS_CODEFREEZE_BUMP_SKIPGLOTPRESS',
|
59
|
+
description: 'Skips GlotPress key update',
|
60
|
+
is_string: false, # true: verifies the input is a string, false: every kind of value
|
61
|
+
default_value: false), # the default value if the user didn't provide one
|
62
|
+
FastlaneCore::ConfigItem.new(key: :skip_deliver,
|
63
|
+
env_name: 'FL_IOS_CODEFREEZE_BUMP_SKIPDELIVER',
|
64
|
+
description: 'Skips Deliver key update',
|
65
|
+
is_string: false, # true: verifies the input is a string, false: every kind of value
|
66
|
+
default_value: false), # the default value if the user didn't provide one
|
67
|
+
|
68
|
+
]
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.output
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.return_value
|
75
|
+
end
|
76
|
+
|
77
|
+
def self.authors
|
78
|
+
['loremattei']
|
79
|
+
end
|
80
|
+
|
81
|
+
def self.is_supported?(platform)
|
82
|
+
platform == :ios
|
83
|
+
end
|
84
|
+
|
85
|
+
private
|
86
|
+
|
87
|
+
def self.create_config
|
88
|
+
@current_version = Fastlane::Helper::Ios::VersionHelper.get_build_version()
|
89
|
+
@current_version_internal = Fastlane::Helper::Ios::VersionHelper.get_internal_version() unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
90
|
+
@new_version_internal = Fastlane::Helper::Ios::VersionHelper.create_internal_version(@new_version) unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
91
|
+
@new_short_version = Fastlane::Helper::Ios::VersionHelper.get_short_version_string(@new_version)
|
92
|
+
@new_release_branch = "release/#{@new_short_version}"
|
93
|
+
end
|
94
|
+
|
95
|
+
def self.show_config
|
96
|
+
UI.message("Current build version: #{@current_version}")
|
97
|
+
UI.message("Current internal version: #{@current_version_internal}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
98
|
+
UI.message("New build version: #{@new_version}")
|
99
|
+
UI.message("New internal version: #{@new_version_internal}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
100
|
+
UI.message("New short version: #{@new_short_version}")
|
101
|
+
UI.message("Release branch: #{@new_release_branch}")
|
102
|
+
end
|
103
|
+
|
104
|
+
def self.update_glotpress_key
|
105
|
+
dm_file = ENV['DOWNLOAD_METADATA']
|
106
|
+
if File.exist?(dm_file)
|
107
|
+
sh("sed -i '' \"s/let glotPressWhatsNewKey.*/let glotPressWhatsNewKey = \\\"v#{@new_short_version}-whats-new\\\"/\" #{dm_file}")
|
108
|
+
else
|
109
|
+
UI.user_error!("Can't find #{dm_file}.")
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class IosCheckBetaDepsAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
require_relative '../../helper/ios/ios_version_helper.rb'
|
6
|
+
require_relative '../../helper/ios/ios_git_helper.rb'
|
7
|
+
|
8
|
+
beta_pods = []
|
9
|
+
File.open(params[:podfile]).each do |li|
|
10
|
+
beta_pods << li if li.match('^\s*\t*pod.*beta')
|
11
|
+
end
|
12
|
+
|
13
|
+
if beta_pods.count == 0
|
14
|
+
UI.message('No beta pods found. You can continue with the code freeze.')
|
15
|
+
else
|
16
|
+
message = "The following pods are still in beta:\n"
|
17
|
+
beta_pods.each do |bpod|
|
18
|
+
message << "#{bpod}\n"
|
19
|
+
end
|
20
|
+
message << 'Please update to the released version before continuing with the code freeze.'
|
21
|
+
end
|
22
|
+
UI.important(message)
|
23
|
+
end
|
24
|
+
|
25
|
+
#####################################################
|
26
|
+
# @!group Documentation
|
27
|
+
#####################################################
|
28
|
+
|
29
|
+
def self.description
|
30
|
+
'Runs some prechecks before finalizing a release'
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.details
|
34
|
+
'Runs some prechecks before finalizing a release'
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.available_options
|
38
|
+
[
|
39
|
+
FastlaneCore::ConfigItem.new(key: :podfile,
|
40
|
+
env_name: 'FL_IOS_CHECKBETADEPS_PODFILE',
|
41
|
+
description: 'Path to the Podfile to analyse',
|
42
|
+
is_string: true),
|
43
|
+
]
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.output
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.return_value
|
50
|
+
''
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.authors
|
54
|
+
['loremattei']
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.is_supported?(platform)
|
58
|
+
platform == :ios
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|