fastlane-plugin-wpmreleasetoolkit 11.0.3 → 12.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 +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb +0 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb +1 -9
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb +0 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/{create_release_action.rb → create_github_release_action.rb} +1 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb +0 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_backmerge_pull_request_action.rb +218 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/publish_github_release_action.rb +63 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +0 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +2 -373
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/git_helper.rb +27 -22
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +26 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb +0 -270
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_short_metadata_block.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +1 -1
- metadata +9 -58
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +0 -137
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +0 -108
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb +0 -90
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb +0 -82
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +0 -91
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb +0 -109
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +0 -108
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +0 -86
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +0 -89
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb +0 -62
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb +0 -62
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb +0 -62
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotfix_prechecks.rb +0 -78
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb +0 -70
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +0 -98
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +0 -74
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb +0 -67
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb +0 -83
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb +0 -87
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +0 -76
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +0 -65
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_current_branch_is_hotfix.rb +0 -40
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +0 -66
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb +0 -54
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_number.rb +0 -54
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb +0 -60
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb +0 -78
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb +0 -44
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb +0 -46
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb +0 -28
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb +0 -28
@@ -15,41 +15,6 @@ module Fastlane
|
|
15
15
|
# The index for the build version number part
|
16
16
|
BUILD_NUMBER = 3
|
17
17
|
|
18
|
-
# Returns the public-facing version string.
|
19
|
-
#
|
20
|
-
# @param [String] xcconfig_file The path for the .xcconfig file containing the public-facing version
|
21
|
-
#
|
22
|
-
# @return [String] The public-facing version number, extracted from the VERSION_LONG entry of the xcconfig file.
|
23
|
-
# - If this version is a hotfix (more than 2 parts and 3rd part is non-zero), returns the "X.Y.Z" formatted string
|
24
|
-
# - Otherwise (not a hotfix / 3rd part of version is 0), returns "X.Y" formatted version number
|
25
|
-
#
|
26
|
-
def self.get_xcconfig_public_version(xcconfig_file:)
|
27
|
-
version = read_long_version_from_config_file(xcconfig_file)
|
28
|
-
|
29
|
-
UI.user_error!(".xcconfig file doesn't have a version configured") if version.nil?
|
30
|
-
|
31
|
-
vp = get_version_parts(version)
|
32
|
-
return "#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}" unless is_hotfix?(version)
|
33
|
-
|
34
|
-
"#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}.#{vp[HOTFIX_NUMBER]}"
|
35
|
-
end
|
36
|
-
|
37
|
-
# Returns the public-facing version string.
|
38
|
-
#
|
39
|
-
# @return [String] The public-facing version number, extracted from the VERSION_LONG entry of the xcconfig file.
|
40
|
-
# - If this version is a hotfix (more than 2 parts and 3rd part is non-zero), returns the "X.Y.Z" formatted string
|
41
|
-
# - Otherwise (not a hotfix / 3rd part of version is 0), returns "X.Y" formatted version number
|
42
|
-
#
|
43
|
-
# @deprecated This method is going to be removed soon due to it's dependency on `ENV['PUBLIC_CONFIG_FILE']` via `get_build_version`.
|
44
|
-
#
|
45
|
-
def self.get_public_version
|
46
|
-
version = get_build_version
|
47
|
-
vp = get_version_parts(version)
|
48
|
-
return "#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}" unless is_hotfix?(version)
|
49
|
-
|
50
|
-
"#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}.#{vp[HOTFIX_NUMBER]}"
|
51
|
-
end
|
52
|
-
|
53
18
|
# Compute the name of the next release version.
|
54
19
|
#
|
55
20
|
# @param [String] version The current version that we want to increment
|
@@ -69,193 +34,6 @@ module Fastlane
|
|
69
34
|
"#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}"
|
70
35
|
end
|
71
36
|
|
72
|
-
# Return the short version string "X.Y" from the full version.
|
73
|
-
#
|
74
|
-
# @param [String] version The version to convert to a short version
|
75
|
-
#
|
76
|
-
# @return [String] A version string consisting of only the first 2 parts "X.Y"
|
77
|
-
#
|
78
|
-
def self.get_short_version_string(version)
|
79
|
-
vp = get_version_parts(version)
|
80
|
-
"#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}"
|
81
|
-
end
|
82
|
-
|
83
|
-
# Compute the name of the previous release version.
|
84
|
-
#
|
85
|
-
# @param [String] version The current version we want to decrement
|
86
|
-
#
|
87
|
-
# @return [String] The predicted previous version, in the form of "X.Y".
|
88
|
-
# Corresponds to decrementing the minor part, or decrement the major and set minor to 9 if minor was 0.
|
89
|
-
#
|
90
|
-
def self.calc_prev_release_version(version)
|
91
|
-
vp = get_version_parts(version)
|
92
|
-
if (vp[MINOR_NUMBER]).zero?
|
93
|
-
vp[MAJOR_NUMBER] -= 1
|
94
|
-
vp[MINOR_NUMBER] = 9
|
95
|
-
else
|
96
|
-
vp[MINOR_NUMBER] -= 1
|
97
|
-
end
|
98
|
-
|
99
|
-
"#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}"
|
100
|
-
end
|
101
|
-
|
102
|
-
# Compute the name of the next build version.
|
103
|
-
#
|
104
|
-
# @param [String] version The current version we want to increment
|
105
|
-
#
|
106
|
-
# @return [String] The predicted next build version, in the form of "X.Y.Z.N".
|
107
|
-
# Corresponds to incrementing the last (4th) component N of the version.
|
108
|
-
#
|
109
|
-
def self.calc_next_build_version(version)
|
110
|
-
vp = get_version_parts(version)
|
111
|
-
vp[BUILD_NUMBER] += 1
|
112
|
-
"#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}.#{vp[HOTFIX_NUMBER]}.#{vp[BUILD_NUMBER]}"
|
113
|
-
end
|
114
|
-
|
115
|
-
# Compute the name of the next hotfix version.
|
116
|
-
#
|
117
|
-
# @param [String] version The current version we want to increment
|
118
|
-
#
|
119
|
-
# @return [String] The predicted next hotfix version, in the form of "X.Y.Z".
|
120
|
-
# Corresponds to incrementing the 3rd component of the version.
|
121
|
-
#
|
122
|
-
def self.calc_next_hotfix_version(version)
|
123
|
-
vp = get_version_parts(version)
|
124
|
-
vp[HOTFIX_NUMBER] += 1
|
125
|
-
"#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}.#{vp[HOTFIX_NUMBER]}"
|
126
|
-
end
|
127
|
-
|
128
|
-
# Compute the name of the previous build version.
|
129
|
-
#
|
130
|
-
# @param [String] version The current version we want to decrement
|
131
|
-
#
|
132
|
-
# @return [String] The predicted previous build version, in the form of "X.Y.Z.N".
|
133
|
-
# Corresponds to decrementing the last (4th) component N of the version.
|
134
|
-
#
|
135
|
-
def self.calc_prev_build_version(version)
|
136
|
-
vp = get_version_parts(version)
|
137
|
-
vp[BUILD_NUMBER] -= 1 unless (vp[BUILD_NUMBER]).zero?
|
138
|
-
"#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}.#{vp[HOTFIX_NUMBER]}.#{vp[BUILD_NUMBER]}"
|
139
|
-
end
|
140
|
-
|
141
|
-
# Compute the name of the previous hotfix version.
|
142
|
-
#
|
143
|
-
# @param [String] version The current version we want to decrement
|
144
|
-
#
|
145
|
-
# @return [String] The predicted previous hotfix version, in the form of "X.Y.Z", or "X.Y" if Z is 0.
|
146
|
-
# Corresponds to decrementing the 3rd component Z of the version, striping it if it ends up being zero.
|
147
|
-
#
|
148
|
-
def self.calc_prev_hotfix_version(version)
|
149
|
-
vp = get_version_parts(version)
|
150
|
-
vp[HOTFIX_NUMBER] -= 1 unless (vp[HOTFIX_NUMBER]).zero?
|
151
|
-
return "#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}.#{vp[HOTFIX_NUMBER]}" unless (vp[HOTFIX_NUMBER]).zero?
|
152
|
-
|
153
|
-
"#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}"
|
154
|
-
end
|
155
|
-
|
156
|
-
# Create an internal version number, for which the build number is based on today's date.
|
157
|
-
#
|
158
|
-
# @param [String] version The current version to create an internal version name for.
|
159
|
-
#
|
160
|
-
# @return [String] The internal version, in the form of "X.Y.Z.YYYYMMDD".
|
161
|
-
#
|
162
|
-
def self.create_internal_version(version)
|
163
|
-
vp = get_version_parts(version)
|
164
|
-
d = DateTime.now
|
165
|
-
today_date = d.strftime('%Y%m%d')
|
166
|
-
"#{vp[MAJOR_NUMBER]}.#{vp[MINOR_NUMBER]}.#{vp[HOTFIX_NUMBER]}.#{today_date}"
|
167
|
-
end
|
168
|
-
|
169
|
-
# Return the build number value incremented by one.
|
170
|
-
#
|
171
|
-
# @param [String|Int|nil] build_number The build number to increment
|
172
|
-
#
|
173
|
-
# @return [Int] The incremented build number, or 0 if it was `nil`.
|
174
|
-
#
|
175
|
-
def self.bump_build_number(build_number)
|
176
|
-
build_number.nil? ? 0 : build_number.to_i + 1
|
177
|
-
end
|
178
|
-
|
179
|
-
# Determines if a version number corresponds to a hotfix
|
180
|
-
#
|
181
|
-
# @param [String] version The version number to test
|
182
|
-
#
|
183
|
-
# @return [Bool] True if the version number has a non-zero 3rd component, meaning that it is a hotfix version.
|
184
|
-
#
|
185
|
-
def self.is_hotfix?(version)
|
186
|
-
vp = get_version_parts(version)
|
187
|
-
(vp.length > 2) && (vp[HOTFIX_NUMBER] != 0)
|
188
|
-
end
|
189
|
-
|
190
|
-
# Returns the current value of the `VERSION_LONG` key from the public xcconfig file
|
191
|
-
#
|
192
|
-
# @return [String] The current version according to the public xcconfig file.
|
193
|
-
#
|
194
|
-
def self.get_build_version
|
195
|
-
xcconfig_file = ENV['PUBLIC_CONFIG_FILE']
|
196
|
-
read_long_version_from_config_file(xcconfig_file)
|
197
|
-
end
|
198
|
-
|
199
|
-
# Returns the current value of the `VERSION_LONG` key from the internal xcconfig file
|
200
|
-
#
|
201
|
-
# @return [String] The current version according to the internal xcconfig file.
|
202
|
-
#
|
203
|
-
def self.get_internal_version
|
204
|
-
xcconfig_file = ENV['INTERNAL_CONFIG_FILE']
|
205
|
-
read_long_version_from_config_file(xcconfig_file)
|
206
|
-
end
|
207
|
-
|
208
|
-
# Prints the current and next release version numbers to stdout, then return the next release version
|
209
|
-
#
|
210
|
-
# @return [String] The next release version to use after bumping the currently used public version.
|
211
|
-
#
|
212
|
-
def self.bump_version_release
|
213
|
-
# Bump release
|
214
|
-
current_version = get_public_version
|
215
|
-
UI.message("Current version: #{current_version}")
|
216
|
-
new_version = calc_next_release_version(current_version)
|
217
|
-
UI.message("New version: #{new_version}")
|
218
|
-
verify_version(new_version)
|
219
|
-
end
|
220
|
-
|
221
|
-
# Update the `.xcconfig` files (the public one, and the internal one if it exists) with the new version strings.
|
222
|
-
#
|
223
|
-
# @env PUBLIC_CONFIG_FILE The path to the xcconfig file containing the public version numbers.
|
224
|
-
# @env INTERNAL_CONFIG_FILE The path to the xcconfig file containing the internal version numbers. Can be nil.
|
225
|
-
#
|
226
|
-
# @param [String] new_version The new version number to use as `VERSION_LONG` for the public xcconfig file
|
227
|
-
# @param [String] new_version_short The new version number to use for `VERSION_SHORT` (for both public and internal xcconfig files)
|
228
|
-
# @param [String] internal_version The new version number to use as `VERSION_LONG` for the interrnal xcconfig file, if it exists
|
229
|
-
#
|
230
|
-
def self.update_xc_configs(new_version, new_version_short, internal_version)
|
231
|
-
update_xc_config(ENV['PUBLIC_CONFIG_FILE'], new_version, new_version_short)
|
232
|
-
update_xc_config(ENV['INTERNAL_CONFIG_FILE'], internal_version, new_version_short) unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
233
|
-
end
|
234
|
-
|
235
|
-
# Updates an xcconfig file with new values for VERSION_SHORT and VERSION_LONG entries.
|
236
|
-
# Also bumps the BUILD_NUMBER value from that config file if there is one present.
|
237
|
-
#
|
238
|
-
# @param [String] file_path The path to the xcconfig file
|
239
|
-
# @param [String] new_version The new version number to use for VERSION_LONG
|
240
|
-
# @param [String] new_version_short The new version number to use for VERSION_SHORT
|
241
|
-
# @raise [UserError] If the xcconfig file was not found
|
242
|
-
#
|
243
|
-
def self.update_xc_config(file_path, new_version, new_version_short)
|
244
|
-
if File.exist?(file_path)
|
245
|
-
UI.message("Updating #{file_path} to version #{new_version_short}/#{new_version}")
|
246
|
-
Action.sh("sed -i '' \"$(awk '/^VERSION_SHORT/{ print NR; exit }' \"#{file_path}\")s/=.*/=#{new_version_short}/\" \"#{file_path}\"")
|
247
|
-
Action.sh("sed -i '' \"$(awk '/^VERSION_LONG/{ print NR; exit }' \"#{file_path}\")s/=.*/=#{new_version}/\" \"#{file_path}\"")
|
248
|
-
|
249
|
-
build_number = read_build_number_from_config_file(file_path)
|
250
|
-
unless build_number.nil?
|
251
|
-
new_build_number = bump_build_number(build_number)
|
252
|
-
Action.sh("sed -i '' \"$(awk '/^BUILD_NUMBER/{ print NR; exit }' \"#{file_path}\")s/=.*/=#{new_build_number}/\" \"#{file_path}\"")
|
253
|
-
end
|
254
|
-
else
|
255
|
-
UI.user_error!("#{file_path} not found")
|
256
|
-
end
|
257
|
-
end
|
258
|
-
|
259
37
|
#----------------------------------------
|
260
38
|
|
261
39
|
# Split a version string into its 4 parts, ensuring its parts count is valid
|
@@ -273,54 +51,6 @@ module Fastlane
|
|
273
51
|
parts
|
274
52
|
end
|
275
53
|
|
276
|
-
# Extract the VERSION_LONG entry from an `xcconfig` file
|
277
|
-
#
|
278
|
-
# @param [String] file_path The path to the `.xcconfig` file to read the value from
|
279
|
-
# @return [String] The long version found in said xcconfig file, or nil if not found
|
280
|
-
#
|
281
|
-
def self.read_long_version_from_config_file(file_path)
|
282
|
-
read_from_config_file('VERSION_LONG', file_path)
|
283
|
-
end
|
284
|
-
|
285
|
-
# Extract the BUILD_NUMBER entry from an `xcconfig` file
|
286
|
-
#
|
287
|
-
# @param [String] file_path The path to the `.xcconfig` file to read the value from
|
288
|
-
# @return [String] The build number found in said xcconfig file, or nil if not found
|
289
|
-
#
|
290
|
-
def self.read_build_number_from_config_file(file_path)
|
291
|
-
read_from_config_file('BUILD_NUMBER', file_path)
|
292
|
-
end
|
293
|
-
|
294
|
-
# Read the value of a given key from an `.xcconfig` file.
|
295
|
-
#
|
296
|
-
# @param [String] key The xcconfig key to get the value for
|
297
|
-
# @param [String] file_path The path to the `.xcconfig` file to read the value from
|
298
|
-
#
|
299
|
-
# @return [String] The value for the given key, or `nil` if the key was not found.
|
300
|
-
#
|
301
|
-
def self.read_from_config_file(key, file_path)
|
302
|
-
UI.user_error!(".xcconfig file #{file_path} not found") unless File.exist?(file_path)
|
303
|
-
|
304
|
-
config = Xcodeproj::Config.new(file_path)
|
305
|
-
config.attributes[key]
|
306
|
-
end
|
307
|
-
|
308
|
-
# Ensure that the version provided is only composed of number parts and return the validated string
|
309
|
-
#
|
310
|
-
# @param [String] version The version string to validate
|
311
|
-
# @return [String] The version string, re-validated as being a string of the form `X.Y.Z.T`
|
312
|
-
# @raise [UserError] Interrupts the lane with a user_error! if the version contains non-numberic parts
|
313
|
-
#
|
314
|
-
def self.verify_version(version)
|
315
|
-
v_parts = get_version_parts(version)
|
316
|
-
|
317
|
-
v_parts.each do |part|
|
318
|
-
UI.user_error!('Version value can only contains numbers.') unless is_int?(part)
|
319
|
-
end
|
320
|
-
|
321
|
-
"#{v_parts[MAJOR_NUMBER]}.#{v_parts[MINOR_NUMBER]}.#{v_parts[HOTFIX_NUMBER]}.#{v_parts[BUILD_NUMBER]}"
|
322
|
-
end
|
323
|
-
|
324
54
|
# Check if a string is an integer
|
325
55
|
#
|
326
56
|
# @param [String] string The string to test
|
data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_short_metadata_block.rb
CHANGED
@@ -4,7 +4,7 @@ module Fastlane
|
|
4
4
|
module Helper
|
5
5
|
class ReleaseNoteShortMetadataBlock < ReleaseNoteMetadataBlock
|
6
6
|
def initialize(block_key, content_file_path, release_version)
|
7
|
-
super
|
7
|
+
super
|
8
8
|
@rel_note_key = 'release_note_short'
|
9
9
|
@release_version = release_version
|
10
10
|
generate_keys(release_version)
|
@@ -16,7 +16,7 @@ module Fastlane
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def generate_block(file)
|
19
|
-
super
|
19
|
+
super unless File.empty?(@content_file_path)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-wpmreleasetoolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 12.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Automattic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -115,9 +115,6 @@ dependencies:
|
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '1.11'
|
118
|
-
- - "<"
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: '1.17'
|
121
118
|
type: :runtime
|
122
119
|
prerelease: false
|
123
120
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -125,9 +122,6 @@ dependencies:
|
|
125
122
|
- - "~>"
|
126
123
|
- !ruby/object:Gem::Version
|
127
124
|
version: '1.11'
|
128
|
-
- - "<"
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '1.17'
|
131
125
|
- !ruby/object:Gem::Dependency
|
132
126
|
name: octokit
|
133
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -350,42 +344,28 @@ dependencies:
|
|
350
344
|
requirements:
|
351
345
|
- - "~>"
|
352
346
|
- !ruby/object:Gem::Version
|
353
|
-
version: '1.
|
354
|
-
type: :development
|
355
|
-
prerelease: false
|
356
|
-
version_requirements: !ruby/object:Gem::Requirement
|
357
|
-
requirements:
|
358
|
-
- - "~>"
|
359
|
-
- !ruby/object:Gem::Version
|
360
|
-
version: '1.0'
|
361
|
-
- !ruby/object:Gem::Dependency
|
362
|
-
name: rubocop-require_tools
|
363
|
-
requirement: !ruby/object:Gem::Requirement
|
364
|
-
requirements:
|
365
|
-
- - "~>"
|
366
|
-
- !ruby/object:Gem::Version
|
367
|
-
version: 0.1.2
|
347
|
+
version: '1.65'
|
368
348
|
type: :development
|
369
349
|
prerelease: false
|
370
350
|
version_requirements: !ruby/object:Gem::Requirement
|
371
351
|
requirements:
|
372
352
|
- - "~>"
|
373
353
|
- !ruby/object:Gem::Version
|
374
|
-
version:
|
354
|
+
version: '1.65'
|
375
355
|
- !ruby/object:Gem::Dependency
|
376
356
|
name: rubocop-rspec
|
377
357
|
requirement: !ruby/object:Gem::Requirement
|
378
358
|
requirements:
|
379
359
|
- - '='
|
380
360
|
- !ruby/object:Gem::Version
|
381
|
-
version:
|
361
|
+
version: '3.0'
|
382
362
|
type: :development
|
383
363
|
prerelease: false
|
384
364
|
version_requirements: !ruby/object:Gem::Requirement
|
385
365
|
requirements:
|
386
366
|
- - '='
|
387
367
|
- !ruby/object:Gem::Version
|
388
|
-
version:
|
368
|
+
version: '3.0'
|
389
369
|
- !ruby/object:Gem::Dependency
|
390
370
|
name: simplecov
|
391
371
|
requirement: !ruby/object:Gem::Requirement
|
@@ -413,30 +393,16 @@ files:
|
|
413
393
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_localize_libs_action.rb
|
414
394
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb
|
415
395
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb
|
416
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb
|
417
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb
|
418
396
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb
|
419
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb
|
420
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb
|
421
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb
|
422
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb
|
423
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb
|
424
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb
|
425
397
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_avd_action.rb
|
426
398
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb
|
427
399
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb
|
428
400
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb
|
429
401
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb
|
430
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb
|
431
402
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_firebase_test.rb
|
432
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb
|
433
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb
|
434
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb
|
435
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotfix_prechecks.rb
|
436
403
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_launch_emulator_action.rb
|
437
404
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_send_app_size_metrics.rb
|
438
405
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_shutdown_emulator_action.rb
|
439
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb
|
440
406
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb
|
441
407
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_annotate_action.rb
|
442
408
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_metadata_action.rb
|
@@ -447,8 +413,9 @@ files:
|
|
447
413
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb
|
448
414
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/comment_on_pr.rb
|
449
415
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/copy_branch_protection_action.rb
|
416
|
+
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_github_release_action.rb
|
450
417
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb
|
451
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/
|
418
|
+
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_backmerge_pull_request_action.rb
|
452
419
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb
|
453
420
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/find_previous_tag.rb
|
454
421
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/firebase_login.rb
|
@@ -457,6 +424,7 @@ files:
|
|
457
424
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb
|
458
425
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb
|
459
426
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb
|
427
|
+
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/publish_github_release_action.rb
|
460
428
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/remove_branch_protection_action.rb
|
461
429
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/set_branch_protection_action.rb
|
462
430
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/set_milestone_frozen_marker_action.rb
|
@@ -470,34 +438,18 @@ files:
|
|
470
438
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_validate_action.rb
|
471
439
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb
|
472
440
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb
|
473
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb
|
474
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb
|
475
441
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb
|
476
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb
|
477
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb
|
478
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb
|
479
442
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb
|
480
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb
|
481
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb
|
482
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_current_branch_is_hotfix.rb
|
483
443
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_download_strings_files_from_glotpress.rb
|
484
444
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb
|
485
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb
|
486
445
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb
|
487
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb
|
488
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_number.rb
|
489
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb
|
490
446
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_store_app_sizes.rb
|
491
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb
|
492
447
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb
|
493
448
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_merge_strings_files.rb
|
494
449
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb
|
495
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb
|
496
450
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb
|
497
451
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb
|
498
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb
|
499
452
|
- lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_emulator_helper.rb
|
500
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb
|
501
453
|
- lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb
|
502
454
|
- lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_tools_path_helper.rb
|
503
455
|
- lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb
|
@@ -511,7 +463,6 @@ files:
|
|
511
463
|
- lib/fastlane/plugin/wpmreleasetoolkit/helper/glotpress_helper.rb
|
512
464
|
- lib/fastlane/plugin/wpmreleasetoolkit/helper/interactive_prompt_reminder.rb
|
513
465
|
- lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_adc_app_sizes_helper.rb
|
514
|
-
- lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb
|
515
466
|
- lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_helper.rb
|
516
467
|
- lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_linter_helper.rb
|
517
468
|
- lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_strings_file_validation_helper.rb
|
@@ -1,137 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
class AndroidBetabuildPrechecksAction < Action
|
4
|
-
def self.run(params)
|
5
|
-
UI.message "Skip confirm: #{params[:skip_confirm]}"
|
6
|
-
UI.message "Work on version: #{params[:base_version]}" unless params[:base_version].nil?
|
7
|
-
|
8
|
-
require_relative '../../helper/android/android_version_helper'
|
9
|
-
require_relative '../../helper/android/android_git_helper'
|
10
|
-
|
11
|
-
build_gradle_path = params[:build_gradle_path]
|
12
|
-
version_properties_path = params[:version_properties_path]
|
13
|
-
|
14
|
-
# Checkout default branch and update
|
15
|
-
default_branch = params[:default_branch]
|
16
|
-
Fastlane::Helper::GitHelper.checkout_and_pull(default_branch)
|
17
|
-
|
18
|
-
# Check versions
|
19
|
-
release_version = Fastlane::Helper::Android::VersionHelper.get_release_version(
|
20
|
-
build_gradle_path: build_gradle_path,
|
21
|
-
version_properties_path: version_properties_path
|
22
|
-
)
|
23
|
-
message = "The following current version has been detected: #{release_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}\n"
|
24
|
-
alpha_release_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version(
|
25
|
-
build_gradle_path: build_gradle_path,
|
26
|
-
version_properties_path: version_properties_path
|
27
|
-
)
|
28
|
-
message << "The following Alpha version has been detected: #{alpha_release_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}\n" unless alpha_release_version.nil?
|
29
|
-
|
30
|
-
# Check branch
|
31
|
-
app_version = Fastlane::Helper::Android::VersionHelper.get_public_version(
|
32
|
-
build_gradle_path: build_gradle_path,
|
33
|
-
version_properties_path: version_properties_path
|
34
|
-
)
|
35
|
-
UI.user_error!("#{message}Release branch for version #{app_version} doesn't exist. Abort.") unless !params[:base_version].nil? || Fastlane::Helper::GitHelper.checkout_and_pull(release: app_version)
|
36
|
-
|
37
|
-
# Check user overwrite
|
38
|
-
unless params[:base_version].nil?
|
39
|
-
overwrite_version = get_user_build_version(version: params[:base_version], message: message)
|
40
|
-
release_version = overwrite_version[0]
|
41
|
-
alpha_release_version = overwrite_version[1]
|
42
|
-
end
|
43
|
-
|
44
|
-
next_beta_version = Fastlane::Helper::Android::VersionHelper.calc_next_beta_version(release_version, alpha_release_version)
|
45
|
-
next_alpha_version = Fastlane::Helper::Android::VersionHelper.calc_next_alpha_version(next_beta_version, alpha_release_version) unless alpha_release_version.nil?
|
46
|
-
|
47
|
-
# Verify
|
48
|
-
message << "Updating branch to version: #{next_beta_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{next_beta_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}) "
|
49
|
-
message << "and #{next_alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{next_alpha_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]}).\n" unless alpha_release_version.nil?
|
50
|
-
if params[:skip_confirm]
|
51
|
-
UI.message(message)
|
52
|
-
else
|
53
|
-
UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
|
54
|
-
end
|
55
|
-
|
56
|
-
# Check local repo status
|
57
|
-
other_action.ensure_git_status_clean
|
58
|
-
|
59
|
-
# Return the current version
|
60
|
-
[next_beta_version, next_alpha_version]
|
61
|
-
end
|
62
|
-
|
63
|
-
def self.get_user_build_version(version:, message:)
|
64
|
-
UI.user_error!("Release branch for version #{version} doesn't exist. Abort.") unless Fastlane::Helper::GitHelper.checkout_and_pull(release: version)
|
65
|
-
release_version = Fastlane::Helper::Android::VersionHelper.get_release_version(
|
66
|
-
build_gradle_path: build_gradle_path,
|
67
|
-
version_properties_path: version_properties_path
|
68
|
-
)
|
69
|
-
message << "Looking at branch release/#{version} as requested by user. Detected version: #{release_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}.\n"
|
70
|
-
alpha_release_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version(
|
71
|
-
build_gradle_path: build_gradle_path,
|
72
|
-
version_properties_path: version_properties_path
|
73
|
-
)
|
74
|
-
message << "and Alpha Version: #{alpha_release_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}\n" unless alpha_release_version.nil?
|
75
|
-
[release_version, alpha_release_version]
|
76
|
-
end
|
77
|
-
|
78
|
-
#####################################################
|
79
|
-
# @!group Documentation
|
80
|
-
#####################################################
|
81
|
-
|
82
|
-
def self.description
|
83
|
-
'Runs some prechecks before preparing for a new test build'
|
84
|
-
end
|
85
|
-
|
86
|
-
def self.details
|
87
|
-
'Updates the relevant release branch, checks the app version and ensure the branch is clean'
|
88
|
-
end
|
89
|
-
|
90
|
-
def self.available_options
|
91
|
-
[
|
92
|
-
FastlaneCore::ConfigItem.new(key: :base_version,
|
93
|
-
env_name: 'FL_ANDROID_BETABUILD_PRECHECKS_BASE_VERSION',
|
94
|
-
description: 'The version to work on', # a short description of this parameter
|
95
|
-
type: String,
|
96
|
-
optional: true), # true: verifies the input is a string, false: every kind of value),
|
97
|
-
FastlaneCore::ConfigItem.new(key: :skip_confirm,
|
98
|
-
env_name: 'FL_ANDROID_BETABUILD_PRECHECKS_SKIPCONFIRM',
|
99
|
-
description: 'Skips confirmation',
|
100
|
-
type: Boolean,
|
101
|
-
default_value: false), # the default value if the user didn't provide one
|
102
|
-
FastlaneCore::ConfigItem.new(key: :default_branch,
|
103
|
-
env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',
|
104
|
-
description: 'Default branch of the repository',
|
105
|
-
type: String,
|
106
|
-
default_value: Fastlane::Helper::GitHelper::DEFAULT_GIT_BRANCH),
|
107
|
-
FastlaneCore::ConfigItem.new(key: :build_gradle_path,
|
108
|
-
description: 'Path to the build.gradle file',
|
109
|
-
type: String,
|
110
|
-
optional: true,
|
111
|
-
conflicting_options: [:version_properties_path]),
|
112
|
-
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
113
|
-
description: 'Path to the version.properties file',
|
114
|
-
type: String,
|
115
|
-
optional: true,
|
116
|
-
conflicting_options: [:build_gradle_path]),
|
117
|
-
]
|
118
|
-
end
|
119
|
-
|
120
|
-
def self.output
|
121
|
-
end
|
122
|
-
|
123
|
-
def self.return_value
|
124
|
-
# If you method provides a return value, you can describe here what it does
|
125
|
-
end
|
126
|
-
|
127
|
-
def self.authors
|
128
|
-
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
129
|
-
['Automattic']
|
130
|
-
end
|
131
|
-
|
132
|
-
def self.is_supported?(platform)
|
133
|
-
platform == :android
|
134
|
-
end
|
135
|
-
end
|
136
|
-
end
|
137
|
-
end
|