fastlane-plugin-wpmreleasetoolkit 8.1.0 → 9.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb +6 -4
  3. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb +1 -1
  4. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +1 -1
  5. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +2 -2
  6. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb +1 -1
  7. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb +1 -1
  8. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +3 -2
  9. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb +1 -1
  10. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +3 -3
  11. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +4 -4
  12. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb +1 -1
  13. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb +1 -1
  14. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +1 -1
  15. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_firebase_test.rb +1 -1
  16. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotfix_prechecks.rb +1 -1
  17. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_trigger_build_action.rb +1 -1
  18. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb +1 -1
  19. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb +1 -1
  20. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_action.rb +4 -3
  21. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb +3 -3
  22. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/find_previous_tag.rb +58 -0
  23. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/get_prs_between_tags.rb +112 -0
  24. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb +5 -5
  25. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb +6 -4
  26. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb +24 -24
  27. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/upload_to_s3.rb +37 -5
  28. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_add_files_to_copy_action.rb +3 -3
  29. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb +3 -3
  30. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_update_action.rb +2 -2
  31. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_validate_action.rb +3 -3
  32. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb +2 -2
  33. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb +2 -2
  34. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +1 -1
  35. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +4 -4
  36. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb +1 -1
  37. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb +5 -7
  38. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb +3 -22
  39. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb +6 -20
  40. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +1 -1
  41. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +1 -1
  42. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +1 -1
  43. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb +11 -4
  44. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb +1 -1
  45. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb +2 -2
  46. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb +2 -2
  47. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb +4 -4
  48. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb +2 -2
  49. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb +39 -41
  50. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +10 -11
  51. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/configure_helper.rb +1 -1
  52. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/git_helper.rb +1 -1
  53. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +39 -1
  54. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_adc_app_sizes_helper.rb +2 -2
  55. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb +2 -55
  56. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_linter_helper.rb +3 -3
  57. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb +42 -52
  58. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/metadata_block.rb +20 -0
  59. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_metadata_block.rb +72 -0
  60. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_short_metadata_block.rb +23 -0
  61. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/standard_metadata_block.rb +47 -0
  62. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/unknown_metadata_block.rb +13 -0
  63. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/whats_new_metadata_block.rb +53 -0
  64. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_download_helper.rb +13 -13
  65. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb +11 -11
  66. data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +3 -1
  67. metadata +32 -15
  68. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/get_prs_list_action.rb +0 -66
  69. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_localize_project.rb +0 -43
  70. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata.rb +0 -40
  71. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/an_metadata_update_helper.rb +0 -152
  72. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_update_helper.rb +0 -182
@@ -1,182 +0,0 @@
1
- module Fastlane
2
- module Helper
3
- # Basic line handler
4
- class MetadataBlock
5
- attr_reader :block_key
6
-
7
- def initialize(block_key)
8
- @block_key = block_key
9
- end
10
-
11
- def handle_line(fw, line)
12
- fw.puts(line) # Standard line handling: just copy
13
- end
14
-
15
- def is_handler_for(key)
16
- true
17
- end
18
- end
19
-
20
- class UnknownMetadataBlock < MetadataBlock
21
- attr_reader :content_file_path
22
-
23
- def initialize
24
- super(nil)
25
- end
26
- end
27
-
28
- class StandardMetadataBlock < MetadataBlock
29
- attr_reader :content_file_path
30
-
31
- def initialize(block_key, content_file_path)
32
- super(block_key)
33
- @content_file_path = content_file_path
34
- end
35
-
36
- def is_handler_for(key)
37
- key == @block_key.to_s
38
- end
39
-
40
- def handle_line(fw, line)
41
- # put the new content on block start
42
- # and skip all the other content
43
- generate_block(fw) if line.start_with?('msgctxt')
44
- end
45
-
46
- def generate_block(fw)
47
- # init
48
- fw.puts("msgctxt \"#{@block_key}\"")
49
- line_count = File.foreach(@content_file_path).inject(0) { |c, _line| c + 1 }
50
-
51
- if line_count <= 1
52
- # Single line output
53
- fw.puts("msgid \"#{File.read(@content_file_path)}\"")
54
- else
55
- # Multiple line output
56
- fw.puts('msgid ""')
57
-
58
- # insert content
59
- sf = File.open(@content_file_path, 'r').to_a
60
- sf.each do |line|
61
- l = "\"#{line.strip}"
62
- l << '\\n' unless line == sf.last
63
- l << '"'
64
- fw.puts(l)
65
- end
66
- end
67
-
68
- # close
69
- fw.puts('msgstr ""')
70
- fw.puts('')
71
- end
72
- end
73
-
74
- class ReleaseNoteMetadataBlock < StandardMetadataBlock
75
- attr_reader :new_key, :keep_key, :rel_note_key, :release_version
76
-
77
- def initialize(block_key, content_file_path, release_version)
78
- super(block_key, content_file_path)
79
- @rel_note_key = 'release_note'
80
- @release_version = release_version
81
- generate_keys(release_version)
82
- end
83
-
84
- def generate_keys(release_version)
85
- values = release_version.split('.')
86
- version_major = Integer(values[0])
87
- version_minor = Integer(values[1])
88
- @new_key = "#{@rel_note_key}_#{version_major}#{version_minor}"
89
-
90
- version_major = version_major - 1 if version_minor == 0
91
- version_minor = version_minor == 0 ? 9 : version_minor - 1
92
-
93
- @keep_key = "#{@rel_note_key}_#{version_major}#{version_minor}"
94
- end
95
-
96
- def is_handler_for(key)
97
- values = key.split('_')
98
- key.start_with?(@rel_note_key) && values.length == 3 && (!Integer(values[2]).nil? rescue false)
99
- end
100
-
101
- def handle_line(fw, line)
102
- # put content on block start or if copying the latest one
103
- # and skip all the other content
104
- if line.start_with?('msgctxt')
105
- key = extract_key(line)
106
- @is_copying = (key == @keep_key)
107
- generate_block(fw) if @is_copying
108
- end
109
-
110
- fw.puts(line) if @is_copying
111
- end
112
-
113
- def generate_block(fw)
114
- # init
115
- fw.puts("msgctxt \"#{@new_key}\"")
116
- fw.puts('msgid ""')
117
- fw.puts("\"#{@release_version}:\\n\"")
118
-
119
- # insert content
120
- File.open(@content_file_path, 'r').each do |line|
121
- fw.puts("\"#{line.strip}\\n\"")
122
- end
123
-
124
- # close
125
- fw.puts('msgstr ""')
126
- fw.puts('')
127
- end
128
-
129
- def extract_key(line)
130
- line.split[1].tr('\"', '')
131
- end
132
- end
133
-
134
- class WhatsNewMetadataBlock < StandardMetadataBlock
135
- attr_reader :new_key, :old_key, :rel_note_key, :release_version
136
-
137
- def initialize(block_key, content_file_path, release_version)
138
- super(block_key, content_file_path)
139
- @rel_note_key = 'whats_new'
140
- @release_version = release_version
141
- generate_keys(release_version)
142
- end
143
-
144
- def generate_keys(release_version)
145
- values = release_version.split('.')
146
- version_major = Integer(values[0])
147
- version_minor = Integer(values[1])
148
- @new_key = "v#{release_version}-whats-new"
149
-
150
- version_major = version_major - 1 if version_minor == 0
151
- version_minor = version_minor == 0 ? 9 : version_minor - 1
152
-
153
- @old_key = "v#{version_major}.#{version_minor}-whats-new"
154
- end
155
-
156
- def is_handler_for(key)
157
- key.start_with?('v') && key.end_with?('-whats-new')
158
- end
159
-
160
- def handle_line(fw, line)
161
- # put content on block start or if copying the latest one
162
- # and skip all the other content
163
- generate_block(fw) if line.start_with?('msgctxt')
164
- end
165
-
166
- def generate_block(fw)
167
- # init
168
- fw.puts("msgctxt \"#{@new_key}\"")
169
- fw.puts('msgid ""')
170
-
171
- # insert content
172
- File.open(@content_file_path, 'r').each do |line|
173
- fw.puts("\"#{line.strip}\\n\"")
174
- end
175
-
176
- # close
177
- fw.puts('msgstr ""')
178
- fw.puts('')
179
- end
180
- end
181
- end
182
- end