fastlane-plugin-wpmreleasetoolkit 9.4.0 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_localize_libs_action.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb +1 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +9 -24
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +8 -19
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb +9 -21
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb +9 -21
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +6 -18
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb +8 -22
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +7 -20
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +5 -16
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb +5 -16
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb +2 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb +5 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +5 -16
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_firebase_test.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb +5 -16
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb +5 -16
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb +5 -16
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb +6 -18
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb +1 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb +5 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/remove_branch_protection_action.rb +0 -11
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/set_branch_protection_action.rb +0 -11
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/{setfrozentag_action.rb → set_milestone_frozen_marker_action.rb} +14 -18
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/{update_pull_requests_milestone_action.rb → update_assigned_milestone_action.rb} +31 -31
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/upload_to_s3.rb +3 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_add_files_to_copy_action.rb +1 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_update_action.rb +5 -7
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_validate_action.rb +10 -12
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb +3 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_current_branch_is_hotfix.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_download_strings_files_from_glotpress.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb +3 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_number.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_store_app_sizes.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb +3 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_merge_strings_files.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb +5 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb +2 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_emulator_helper.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb +0 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb +27 -27
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +29 -34
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/configure_helper.rb +20 -21
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/filesystem_helper.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/git_helper.rb +18 -8
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +8 -8
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/glotpress_helper.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/interactive_prompt_reminder.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_adc_app_sizes_helper.rb +7 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_helper.rb +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_linter_helper.rb +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb +11 -11
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_download_helper.rb +9 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb +14 -16
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/configuration.rb +7 -7
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/file_reference.rb +7 -7
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/firebase_test_lab_result.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +1 -1
- metadata +14 -17
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_clear_intermediate_tags.rb +0 -72
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_final_tag.rb +0 -64
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/deprecated.rb +0 -66
data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb
CHANGED
@@ -7,8 +7,7 @@ module Fastlane
|
|
7
7
|
require_relative '../../helper/android/android_localize_helper'
|
8
8
|
require_relative '../../helper/git_helper'
|
9
9
|
|
10
|
-
|
11
|
-
res_dir = File.join(project_root_folder || '.', params[:res_dir])
|
10
|
+
res_dir = File.join('.', params[:res_dir])
|
12
11
|
|
13
12
|
Fastlane::Helper::Android::LocalizeHelper.create_available_languages_file(
|
14
13
|
res_dir: res_dir,
|
@@ -23,7 +22,10 @@ module Fastlane
|
|
23
22
|
|
24
23
|
# Update submodules then lint translations
|
25
24
|
unless params[:lint_task].nil? || params[:lint_task].empty?
|
26
|
-
|
25
|
+
git_submodule_update(
|
26
|
+
recursive: true,
|
27
|
+
init: true
|
28
|
+
)
|
27
29
|
Action.sh('./gradlew', params[:lint_task])
|
28
30
|
end
|
29
31
|
|
@@ -95,7 +97,6 @@ module Fastlane
|
|
95
97
|
type: Boolean,
|
96
98
|
default_value: false
|
97
99
|
),
|
98
|
-
Fastlane::Helper::Deprecated.project_root_folder_config_item,
|
99
100
|
]
|
100
101
|
end
|
101
102
|
|
@@ -15,16 +15,12 @@ module Fastlane
|
|
15
15
|
current_branch = Fastlane::Helper::GitHelper.current_git_branch
|
16
16
|
UI.user_error!("Current branch - '#{current_branch}' - is not a release branch. Abort.") unless current_branch.start_with?('release/')
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
project_name = params[:project_name]
|
21
|
-
build_gradle_path = params[:build_gradle_path] || (File.join(project_root_folder || '.', project_name, 'build.gradle') unless project_name.nil?)
|
22
|
-
version_properties_path = params[:version_properties_path] || File.join(project_root_folder || '.', 'version.properties')
|
18
|
+
build_gradle_path = params[:build_gradle_path]
|
19
|
+
version_properties_path = params[:version_properties_path]
|
23
20
|
|
24
21
|
version = Fastlane::Helper::Android::VersionHelper.get_public_version(
|
25
22
|
build_gradle_path: build_gradle_path,
|
26
|
-
version_properties_path: version_properties_path
|
27
|
-
has_alpha_version: has_alpha_version
|
23
|
+
version_properties_path: version_properties_path
|
28
24
|
)
|
29
25
|
message = "Finalizing release: #{version}\n"
|
30
26
|
if params[:skip_confirm]
|
@@ -65,19 +61,12 @@ module Fastlane
|
|
65
61
|
description: 'Path to the build.gradle file',
|
66
62
|
type: String,
|
67
63
|
optional: true,
|
68
|
-
conflicting_options:
|
69
|
-
project_root_folder
|
70
|
-
version_properties_path]),
|
64
|
+
conflicting_options: [:version_properties_path]),
|
71
65
|
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
72
66
|
description: 'Path to the version.properties file',
|
73
67
|
type: String,
|
74
68
|
optional: true,
|
75
|
-
conflicting_options:
|
76
|
-
project_name
|
77
|
-
project_root_folder]),
|
78
|
-
Fastlane::Helper::Deprecated.project_root_folder_config_item,
|
79
|
-
Fastlane::Helper::Deprecated.project_name_config_item,
|
80
|
-
Fastlane::Helper::Deprecated.has_alpha_version_config_item,
|
69
|
+
conflicting_options: [:build_gradle_path]),
|
81
70
|
]
|
82
71
|
end
|
83
72
|
|
@@ -50,11 +50,11 @@ module Fastlane
|
|
50
50
|
|
51
51
|
if result.success?
|
52
52
|
UI.success 'Firebase Tests Complete'
|
53
|
-
|
53
|
+
true
|
54
54
|
else
|
55
55
|
ui_method = params[:crash_on_test_failure] ? :test_failure! : :error
|
56
56
|
FastlaneCore::UI.send(ui_method, "Firebase Tests failed – more information can be found at #{result.more_details_url}")
|
57
|
-
|
57
|
+
false
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
@@ -4,16 +4,12 @@ module Fastlane
|
|
4
4
|
def self.run(params)
|
5
5
|
require_relative '../../helper/android/android_version_helper'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
project_name = params[:project_name]
|
10
|
-
build_gradle_path = params[:build_gradle_path] || (File.join(project_root_folder || '.', project_name, 'build.gradle') unless project_name.nil?)
|
11
|
-
version_properties_path = params[:version_properties_path] || File.join(project_root_folder || '.', 'version.properties')
|
7
|
+
build_gradle_path = params[:build_gradle_path]
|
8
|
+
version_properties_path = params[:version_properties_path]
|
12
9
|
|
13
10
|
Fastlane::Helper::Android::VersionHelper.get_alpha_version(
|
14
11
|
build_gradle_path: build_gradle_path,
|
15
|
-
version_properties_path: version_properties_path
|
16
|
-
has_alpha_version: has_alpha_version
|
12
|
+
version_properties_path: version_properties_path
|
17
13
|
)
|
18
14
|
end
|
19
15
|
|
@@ -35,19 +31,12 @@ module Fastlane
|
|
35
31
|
description: 'Path to the build.gradle file',
|
36
32
|
type: String,
|
37
33
|
optional: true,
|
38
|
-
conflicting_options:
|
39
|
-
project_root_folder
|
40
|
-
version_properties_path]),
|
34
|
+
conflicting_options: [:version_properties_path]),
|
41
35
|
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
42
36
|
description: 'Path to the version.properties file',
|
43
37
|
type: String,
|
44
38
|
optional: true,
|
45
|
-
conflicting_options:
|
46
|
-
project_name
|
47
|
-
project_root_folder]),
|
48
|
-
Fastlane::Helper::Deprecated.project_root_folder_config_item,
|
49
|
-
Fastlane::Helper::Deprecated.project_name_config_item,
|
50
|
-
Fastlane::Helper::Deprecated.has_alpha_version_config_item,
|
39
|
+
conflicting_options: [:build_gradle_path]),
|
51
40
|
]
|
52
41
|
end
|
53
42
|
|
@@ -4,16 +4,12 @@ module Fastlane
|
|
4
4
|
def self.run(params)
|
5
5
|
require_relative '../../helper/android/android_version_helper'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
project_name = params[:project_name]
|
10
|
-
build_gradle_path = params[:build_gradle_path] || (File.join(project_root_folder || '.', project_name, 'build.gradle') unless project_name.nil?)
|
11
|
-
version_properties_path = params[:version_properties_path] || File.join(project_root_folder || '.', 'version.properties')
|
7
|
+
build_gradle_path = params[:build_gradle_path]
|
8
|
+
version_properties_path = params[:version_properties_path]
|
12
9
|
|
13
10
|
Fastlane::Helper::Android::VersionHelper.get_public_version(
|
14
11
|
build_gradle_path: build_gradle_path,
|
15
|
-
version_properties_path: version_properties_path
|
16
|
-
has_alpha_version: has_alpha_version
|
12
|
+
version_properties_path: version_properties_path
|
17
13
|
)
|
18
14
|
end
|
19
15
|
|
@@ -35,19 +31,12 @@ module Fastlane
|
|
35
31
|
description: 'Path to the build.gradle file',
|
36
32
|
type: String,
|
37
33
|
optional: true,
|
38
|
-
conflicting_options:
|
39
|
-
project_root_folder
|
40
|
-
version_properties_path]),
|
34
|
+
conflicting_options: [:version_properties_path]),
|
41
35
|
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
42
36
|
description: 'Path to the version.properties file',
|
43
37
|
type: String,
|
44
38
|
optional: true,
|
45
|
-
conflicting_options:
|
46
|
-
project_name
|
47
|
-
project_root_folder]),
|
48
|
-
Fastlane::Helper::Deprecated.project_root_folder_config_item,
|
49
|
-
Fastlane::Helper::Deprecated.project_name_config_item,
|
50
|
-
Fastlane::Helper::Deprecated.has_alpha_version_config_item,
|
39
|
+
conflicting_options: [:build_gradle_path]),
|
51
40
|
]
|
52
41
|
end
|
53
42
|
|
@@ -4,16 +4,12 @@ module Fastlane
|
|
4
4
|
def self.run(params)
|
5
5
|
require_relative '../../helper/android/android_version_helper'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
project_name = params[:project_name]
|
10
|
-
build_gradle_path = params[:build_gradle_path] || (File.join(project_root_folder || '.', project_name, 'build.gradle') unless project_name.nil?)
|
11
|
-
version_properties_path = params[:version_properties_path] || File.join(project_root_folder || '.', 'version.properties')
|
7
|
+
build_gradle_path = params[:build_gradle_path]
|
8
|
+
version_properties_path = params[:version_properties_path]
|
12
9
|
|
13
10
|
Fastlane::Helper::Android::VersionHelper.get_release_version(
|
14
11
|
build_gradle_path: build_gradle_path,
|
15
|
-
version_properties_path: version_properties_path
|
16
|
-
has_alpha_version: has_alpha_version
|
12
|
+
version_properties_path: version_properties_path
|
17
13
|
)
|
18
14
|
end
|
19
15
|
|
@@ -35,19 +31,12 @@ module Fastlane
|
|
35
31
|
description: 'Path to the build.gradle file',
|
36
32
|
type: String,
|
37
33
|
optional: true,
|
38
|
-
conflicting_options:
|
39
|
-
project_root_folder
|
40
|
-
version_properties_path]),
|
34
|
+
conflicting_options: [:version_properties_path]),
|
41
35
|
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
42
36
|
description: 'Path to the version.properties file',
|
43
37
|
type: String,
|
44
38
|
optional: true,
|
45
|
-
conflicting_options:
|
46
|
-
project_name
|
47
|
-
project_root_folder]),
|
48
|
-
Fastlane::Helper::Deprecated.project_root_folder_config_item,
|
49
|
-
Fastlane::Helper::Deprecated.project_name_config_item,
|
50
|
-
Fastlane::Helper::Deprecated.has_alpha_version_config_item,
|
39
|
+
conflicting_options: [:build_gradle_path]),
|
51
40
|
]
|
52
41
|
end
|
53
42
|
|
@@ -5,21 +5,16 @@ module Fastlane
|
|
5
5
|
require_relative '../../helper/android/android_version_helper'
|
6
6
|
require_relative '../../helper/android/android_git_helper'
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
project_name = params[:project_name]
|
11
|
-
build_gradle_path = params[:build_gradle_path] || (File.join(project_root_folder || '.', project_name, 'build.gradle') unless project_name.nil?)
|
12
|
-
version_properties_path = params[:version_properties_path] || File.join(project_root_folder || '.', 'version.properties')
|
8
|
+
build_gradle_path = params[:build_gradle_path]
|
9
|
+
version_properties_path = params[:version_properties_path]
|
13
10
|
|
14
11
|
release_ver = Fastlane::Helper::Android::VersionHelper.get_release_version(
|
15
12
|
build_gradle_path: build_gradle_path,
|
16
|
-
version_properties_path: version_properties_path
|
17
|
-
has_alpha_version: has_alpha_version
|
13
|
+
version_properties_path: version_properties_path
|
18
14
|
)
|
19
15
|
alpha_ver = Fastlane::Helper::Android::VersionHelper.get_alpha_version(
|
20
16
|
build_gradle_path: build_gradle_path,
|
21
|
-
version_properties_path: version_properties_path
|
22
|
-
has_alpha_version: has_alpha_version
|
17
|
+
version_properties_path: version_properties_path
|
23
18
|
)
|
24
19
|
Fastlane::Helper::GitHelper.create_tag(release_ver[Fastlane::Helper::Android::VersionHelper::VERSION_NAME])
|
25
20
|
Fastlane::Helper::GitHelper.create_tag(alpha_ver[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]) unless alpha_ver.nil? || (params[:tag_alpha] == false)
|
@@ -48,19 +43,12 @@ module Fastlane
|
|
48
43
|
description: 'Path to the build.gradle file',
|
49
44
|
type: String,
|
50
45
|
optional: true,
|
51
|
-
conflicting_options:
|
52
|
-
project_root_folder
|
53
|
-
version_properties_path]),
|
46
|
+
conflicting_options: [:version_properties_path]),
|
54
47
|
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
55
48
|
description: 'Path to the version.properties file',
|
56
49
|
type: String,
|
57
50
|
optional: true,
|
58
|
-
conflicting_options:
|
59
|
-
project_name
|
60
|
-
project_root_folder]),
|
61
|
-
Fastlane::Helper::Deprecated.project_root_folder_config_item,
|
62
|
-
Fastlane::Helper::Deprecated.project_name_config_item,
|
63
|
-
Fastlane::Helper::Deprecated.has_alpha_version_config_item,
|
51
|
+
conflicting_options: [:build_gradle_path]),
|
64
52
|
]
|
65
53
|
end
|
66
54
|
|
@@ -8,8 +8,6 @@ module Fastlane
|
|
8
8
|
require_relative '../../helper/release_notes_helper'
|
9
9
|
require_relative '../../helper/git_helper'
|
10
10
|
|
11
|
-
UI.deprecated('The `PROJECT_ROOT_FOLDER` environment variable is deprecated and will be removed in a future release. Please pass a path to the `release_notes_file_path` param instead.') unless ENV['PROJECT_ROOT_FOLDER'].nil?
|
12
|
-
|
13
11
|
path = params[:release_notes_file_path]
|
14
12
|
next_version = Fastlane::Helper::Android::VersionHelper.calc_next_release_short_version(params[:new_version])
|
15
13
|
|
@@ -41,7 +39,7 @@ module Fastlane
|
|
41
39
|
env_name: 'FL_ANDROID_UPDATE_RELEASE_NOTES_FILE_PATH',
|
42
40
|
description: 'The path to the release notes file to be updated',
|
43
41
|
type: String,
|
44
|
-
default_value:
|
42
|
+
default_value: 'RELEASE-NOTES.txt'),
|
45
43
|
]
|
46
44
|
end
|
47
45
|
|
@@ -14,10 +14,10 @@ module Fastlane
|
|
14
14
|
extracted_notes_file.nil? ? puts(line) : extracted_notes_file.write(line)
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
return if extracted_notes_file.nil?
|
18
|
+
|
19
|
+
extracted_notes_file.close
|
20
|
+
check_and_commit_extracted_notes_file(extracted_notes_file_path, version)
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.extract_notes(release_notes_file_path, version)
|
@@ -35,7 +35,7 @@ module Fastlane
|
|
35
35
|
# .po fo the others.
|
36
36
|
def self.create_temp_po(params)
|
37
37
|
orig = params[:po_file_path]
|
38
|
-
target =
|
38
|
+
target = create_target_file_path(orig)
|
39
39
|
|
40
40
|
# Clear if older exists
|
41
41
|
FileUtils.rm_f(target)
|
@@ -47,7 +47,7 @@ module Fastlane
|
|
47
47
|
write_target_block(fw, fr)
|
48
48
|
end
|
49
49
|
end
|
50
|
-
rescue
|
50
|
+
rescue StandardError
|
51
51
|
FileUtils.rm_f(target)
|
52
52
|
raise
|
53
53
|
end
|
@@ -8,8 +8,8 @@ module Fastlane
|
|
8
8
|
class PromoScreenshotsAction < Action
|
9
9
|
def self.run(params)
|
10
10
|
UI.message 'Creating Promo Screenshots'
|
11
|
-
UI.message "#{
|
12
|
-
UI.message "#{
|
11
|
+
UI.message "#{check_path(params[:orig_folder])} Original Screenshot Source: #{params[:orig_folder]}"
|
12
|
+
UI.message "#{check_path(params[:metadata_folder])} Translation source: #{params[:metadata_folder]}"
|
13
13
|
|
14
14
|
config = helper.read_config(params[:config_file])
|
15
15
|
|
@@ -19,7 +19,7 @@ module Fastlane
|
|
19
19
|
image_directories = subdirectories_for_path(params[:orig_folder])
|
20
20
|
|
21
21
|
if helper.can_resolve_path(params[:output_folder])
|
22
|
-
UI.message "#{
|
22
|
+
UI.message "#{check_path(params[:output_folder])} Output Folder: #{params[:output_folder]}"
|
23
23
|
else
|
24
24
|
UI.message "✅ Created Output Folder: #{params[:output_folder]}"
|
25
25
|
FileUtils.mkdir_p(params[:output_folder])
|
@@ -113,11 +113,11 @@ module Fastlane
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def self.check_path(path)
|
116
|
-
|
116
|
+
helper.can_resolve_path(path) ? '✅' : '🚫'
|
117
117
|
end
|
118
118
|
|
119
119
|
def self.helper
|
120
|
-
|
120
|
+
Fastlane::Helper::PromoScreenshots.new
|
121
121
|
end
|
122
122
|
|
123
123
|
def self.description
|
data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/remove_branch_protection_action.rb
CHANGED
@@ -55,16 +55,5 @@ module Fastlane
|
|
55
55
|
true
|
56
56
|
end
|
57
57
|
end
|
58
|
-
|
59
|
-
# For backwards compatibility
|
60
|
-
class RemovebranchprotectionAction < RemoveBranchProtectionAction
|
61
|
-
def self.category
|
62
|
-
:deprecated
|
63
|
-
end
|
64
|
-
|
65
|
-
def self.deprecated_notes
|
66
|
-
"This action has been renamed `#{superclass.action_name}`"
|
67
|
-
end
|
68
|
-
end
|
69
58
|
end
|
70
59
|
end
|
@@ -138,16 +138,5 @@ module Fastlane
|
|
138
138
|
true
|
139
139
|
end
|
140
140
|
end
|
141
|
-
|
142
|
-
# For backwards compatibility
|
143
|
-
class SetbranchprotectionAction < SetBranchProtectionAction
|
144
|
-
def self.category
|
145
|
-
:deprecated
|
146
|
-
end
|
147
|
-
|
148
|
-
def self.deprecated_notes
|
149
|
-
"This action has been renamed `#{superclass.action_name}`"
|
150
|
-
end
|
151
|
-
end
|
152
141
|
end
|
153
142
|
end
|
@@ -3,7 +3,7 @@ require_relative '../../helper/github_helper'
|
|
3
3
|
|
4
4
|
module Fastlane
|
5
5
|
module Actions
|
6
|
-
class
|
6
|
+
class SetMilestoneFrozenMarkerAction < Action
|
7
7
|
def self.run(params)
|
8
8
|
repository = params[:repository]
|
9
9
|
milestone_title = params[:milestone]
|
@@ -12,49 +12,45 @@ module Fastlane
|
|
12
12
|
github_helper = Fastlane::Helper::GithubHelper.new(github_token: params[:github_token])
|
13
13
|
milestone = github_helper.get_milestone(repository, milestone_title)
|
14
14
|
|
15
|
-
UI.user_error!("Milestone
|
15
|
+
UI.user_error!("Milestone `#{milestone_title}` not found.") if milestone.nil?
|
16
16
|
|
17
17
|
mile_title = milestone[:title]
|
18
|
-
|
18
|
+
|
19
19
|
if freeze
|
20
20
|
# Check if the state needs changes
|
21
21
|
if is_frozen(milestone)
|
22
|
-
UI.message("Milestone
|
22
|
+
UI.message("Milestone `#{mile_title}` is already frozen. Nothing to do")
|
23
23
|
return # Already frozen: nothing to do
|
24
24
|
end
|
25
25
|
|
26
26
|
mile_title = "#{mile_title} ❄️"
|
27
27
|
else
|
28
|
-
|
28
|
+
unless is_frozen(milestone)
|
29
|
+
UI.message("Milestone `#{mile_title}` is not frozen. Nothing to do")
|
30
|
+
return # Not frozen: nothing to do
|
31
|
+
end
|
32
|
+
|
33
|
+
mile_title = milestone[:title].gsub(/ ?❄️/, '')
|
29
34
|
end
|
30
35
|
|
31
|
-
UI.message("New milestone:
|
36
|
+
UI.message("New milestone title: `#{mile_title}`")
|
32
37
|
github_helper.update_milestone(repository: repository, number: milestone[:number], title: mile_title)
|
33
38
|
end
|
34
39
|
|
35
40
|
def self.is_frozen(milestone)
|
36
41
|
return milestone[:title].include?('❄️') unless milestone.nil?
|
37
42
|
|
38
|
-
|
43
|
+
false
|
39
44
|
end
|
40
45
|
|
41
46
|
def self.description
|
42
|
-
'
|
47
|
+
'Add or remove the frozen marker (❄️ emoji) on a given GitHub milestone'
|
43
48
|
end
|
44
49
|
|
45
50
|
def self.authors
|
46
51
|
['Automattic']
|
47
52
|
end
|
48
53
|
|
49
|
-
def self.return_value
|
50
|
-
# If your method provides a return value, you can describe here what it does
|
51
|
-
end
|
52
|
-
|
53
|
-
def self.details
|
54
|
-
# Optional:
|
55
|
-
'Sets the frozen tag for the specified milestone'
|
56
|
-
end
|
57
|
-
|
58
54
|
def self.available_options
|
59
55
|
[
|
60
56
|
FastlaneCore::ConfigItem.new(key: :repository,
|
@@ -68,7 +64,7 @@ module Fastlane
|
|
68
64
|
optional: false,
|
69
65
|
type: String),
|
70
66
|
FastlaneCore::ConfigItem.new(key: :freeze,
|
71
|
-
description: 'If true, the action will add the ❄️ emoji to the milestone title',
|
67
|
+
description: 'If true, the action will add the ❄️ emoji to the milestone title; otherwise, will remove it if already present',
|
72
68
|
optional: false,
|
73
69
|
default_value: true,
|
74
70
|
type: Boolean),
|
@@ -3,16 +3,16 @@ require_relative '../../helper/github_helper'
|
|
3
3
|
|
4
4
|
module Fastlane
|
5
5
|
module Actions
|
6
|
-
class
|
6
|
+
class UpdateAssignedMilestoneAction < Action
|
7
7
|
def self.run(params)
|
8
8
|
repository = params[:repository]
|
9
9
|
|
10
10
|
github_helper = Fastlane::Helper::GithubHelper.new(github_token: params[:github_token])
|
11
11
|
|
12
|
-
|
12
|
+
numbers = params[:numbers]
|
13
13
|
from_milestone = params[:from_milestone]
|
14
14
|
to_milestone = params[:to_milestone]
|
15
|
-
|
15
|
+
comment = params[:comment]
|
16
16
|
|
17
17
|
target_milestone = nil
|
18
18
|
unless to_milestone.nil?
|
@@ -20,39 +20,39 @@ module Fastlane
|
|
20
20
|
UI.user_error!("Unable to find target milestone matching version #{to_milestone}") if target_milestone.nil?
|
21
21
|
end
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
23
|
+
issues_list = if numbers
|
24
|
+
numbers
|
25
|
+
elsif from_milestone
|
26
|
+
# get the milestone object based on title starting text
|
27
|
+
m = github_helper.get_milestone(repository, from_milestone)
|
28
|
+
UI.user_error!("Unable to find source milestone matching version #{from_milestone}") if m.nil?
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
# get all open PRs in that milestone
|
31
|
+
github_helper.get_prs_and_issues_for_milestone(repository: repository, milestone: m).map(&:number)
|
32
|
+
else
|
33
|
+
UI.user_error!('One of `numbers` or `from_milestone` must be provided to indicate which PR(s)/issue(s) to update')
|
34
|
+
end
|
35
35
|
|
36
|
-
UI.message("Updating milestone of #{
|
36
|
+
UI.message("Updating milestone of #{issues_list.count} PRs/Issues to `#{target_milestone&.title}`")
|
37
37
|
|
38
|
-
|
39
|
-
github_helper.
|
38
|
+
issues_list.each do |num|
|
39
|
+
github_helper.set_milestone(
|
40
40
|
repository: repository,
|
41
|
-
|
41
|
+
number: num,
|
42
42
|
milestone: target_milestone
|
43
43
|
)
|
44
|
-
next if
|
44
|
+
next if comment.nil? || comment.empty?
|
45
45
|
|
46
46
|
github_helper.comment_on_pr(
|
47
47
|
project_slug: repository,
|
48
|
-
pr_number:
|
49
|
-
body:
|
48
|
+
pr_number: num,
|
49
|
+
body: comment
|
50
50
|
)
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
def self.description
|
55
|
-
'Updates the milestone field of PRs'
|
55
|
+
'Updates the milestone field of GitHub Issues and PRs'
|
56
56
|
end
|
57
57
|
|
58
58
|
def self.authors
|
@@ -60,11 +60,11 @@ module Fastlane
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def self.return_value
|
63
|
-
'The
|
63
|
+
'The numbers of all the PRs and Isses that were updated with the new milestone'
|
64
64
|
end
|
65
65
|
|
66
66
|
def self.details
|
67
|
-
'Updates the milestone field of a
|
67
|
+
'Updates the milestone field of a given list of PRs/Issues, or of all still-opened PRs/Issues in a given milestone'
|
68
68
|
end
|
69
69
|
|
70
70
|
def self.available_options
|
@@ -74,22 +74,22 @@ module Fastlane
|
|
74
74
|
description: 'The remote path of the GH repository on which we work',
|
75
75
|
optional: false,
|
76
76
|
type: String),
|
77
|
-
FastlaneCore::ConfigItem.new(key: :
|
78
|
-
description: 'The PR numbers to update the milestone of',
|
77
|
+
FastlaneCore::ConfigItem.new(key: :numbers,
|
78
|
+
description: 'The PR and/or issue numbers to update the milestone of',
|
79
79
|
optional: true,
|
80
80
|
type: Array,
|
81
81
|
conflicting_options: [:from_milestone]),
|
82
82
|
FastlaneCore::ConfigItem.new(key: :from_milestone,
|
83
|
-
description: 'The version (milestone title
|
83
|
+
description: 'The version (start of the milestone title) for which we intend to update all open PRs and issues to a new milestone',
|
84
84
|
optional: true,
|
85
85
|
type: String,
|
86
|
-
conflicting_options: [:
|
86
|
+
conflicting_options: [:numbers]),
|
87
87
|
FastlaneCore::ConfigItem.new(key: :to_milestone,
|
88
|
-
description: 'The version (milestone title
|
88
|
+
description: 'The version (start of the milestone title) for the new milestone to assign to the targeted PRs and issues. Pass nil to unset the milestone',
|
89
89
|
optional: true,
|
90
90
|
type: String),
|
91
|
-
FastlaneCore::ConfigItem.new(key: :
|
92
|
-
description: 'If non-nil, the custom comment to leave on each PR whose milestone has been updated',
|
91
|
+
FastlaneCore::ConfigItem.new(key: :comment,
|
92
|
+
description: 'If non-nil, the custom comment to leave on each PR and issue whose milestone has been updated',
|
93
93
|
optional: true,
|
94
94
|
type: String),
|
95
95
|
Fastlane::Helper::GithubHelper.github_token_config_item,
|
@@ -53,7 +53,7 @@ module Fastlane
|
|
53
53
|
|
54
54
|
Actions.lane_context[SharedValues::S3_UPLOADED_FILE_PATH] = key
|
55
55
|
|
56
|
-
|
56
|
+
key
|
57
57
|
end
|
58
58
|
|
59
59
|
def self.file_is_already_uploaded?(bucket, key)
|
@@ -61,9 +61,9 @@ module Fastlane
|
|
61
61
|
bucket: bucket,
|
62
62
|
key: key
|
63
63
|
)
|
64
|
-
|
64
|
+
response[:content_length].positive?
|
65
65
|
rescue Aws::S3::Errors::NotFound
|
66
|
-
|
66
|
+
false
|
67
67
|
end
|
68
68
|
|
69
69
|
def self.description
|
@@ -34,9 +34,7 @@ module Fastlane
|
|
34
34
|
update_configure_file
|
35
35
|
end
|
36
36
|
|
37
|
-
Fastlane::Helper::ConfigureHelper.files_to_copy.each
|
38
|
-
file_reference.update
|
39
|
-
end
|
37
|
+
Fastlane::Helper::ConfigureHelper.files_to_copy.each(&:update)
|
40
38
|
|
41
39
|
UI.success "Configuration Secrets are up to date – don't forget to commit your changes to `.configure`."
|
42
40
|
|
@@ -56,10 +54,10 @@ module Fastlane
|
|
56
54
|
end
|
57
55
|
|
58
56
|
def self.prompt_to_update_to_most_recent_version
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
57
|
+
return unless UI.confirm("The current branch is #{repo_commits_behind_remote} commit(s) behind. Would you like to update it?")
|
58
|
+
|
59
|
+
update_branch
|
60
|
+
update_configure_file
|
63
61
|
end
|
64
62
|
|
65
63
|
def self.prompt_to_update_configure_file_to_most_recent_hash
|