fastlane-plugin-wpmreleasetoolkit 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/drawText/extconf.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb +3 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +5 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +5 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotifx_prechecks.rb +5 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_merge_translators_strings.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_metadata.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb +3 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_for_toolkit_updates_action.rb +99 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/circleci_trigger_job_action.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb +6 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/removebranchprotection_action.rb +3 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setbranchprotection_action.rb +3 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setfrozentag_action.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +5 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb +2 -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 +5 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_clear_intermediate_tags.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +5 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_current_branch_is_hotfix.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_final_tag.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +5 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.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 +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotifx_prechecks.rb +5 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_localize_project.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_merge_translators_strings.rb +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb +3 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/an_metadata_update_helper.rb +3 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb +11 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +9 -9
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ci_helper.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/configure_helper.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/encryption_helper.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +4 -6
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_adc_app_sizes_helper.rb +3 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_helper.rb +3 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_update_helper.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/configuration.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +1 -1
- metadata +4 -3
@@ -2,8 +2,8 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class IosValidateCiBuildAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
require_relative '../../helper/ios/ios_git_helper
|
6
|
-
require_relative '../../helper/ios/ios_version_helper
|
5
|
+
require_relative '../../helper/ios/ios_git_helper'
|
6
|
+
require_relative '../../helper/ios/ios_version_helper'
|
7
7
|
|
8
8
|
version = Fastlane::Helper::Ios::VersionHelper.get_public_version()
|
9
9
|
head_tags = Fastlane::Helper::GitHelper.list_tags_on_current_commit()
|
@@ -91,7 +91,7 @@ module Fastlane
|
|
91
91
|
|
92
92
|
def is_handler_for(key)
|
93
93
|
values = key.split('_')
|
94
|
-
key.start_with?(@rel_note_key) && values.length == 3 && is_int?(values[2].sub(/^
|
94
|
+
key.start_with?(@rel_note_key) && values.length == 3 && is_int?(values[2].sub(/^0*/, ''))
|
95
95
|
end
|
96
96
|
|
97
97
|
def handle_line(fw, line)
|
@@ -123,7 +123,7 @@ module Fastlane
|
|
123
123
|
end
|
124
124
|
|
125
125
|
def extract_key(line)
|
126
|
-
line.split
|
126
|
+
line.split[1].tr('\"', '')
|
127
127
|
end
|
128
128
|
|
129
129
|
def is_int?(value)
|
@@ -141,7 +141,7 @@ module Fastlane
|
|
141
141
|
|
142
142
|
def is_handler_for(key)
|
143
143
|
values = key.split('_')
|
144
|
-
key.start_with?(@rel_note_key) && values.length == 4 && is_int?(values[3].sub(/^
|
144
|
+
key.start_with?(@rel_note_key) && values.length == 4 && is_int?(values[3].sub(/^0*/, ''))
|
145
145
|
end
|
146
146
|
|
147
147
|
def generate_block(fw)
|
@@ -154,7 +154,7 @@ module Fastlane
|
|
154
154
|
def self.verify_local_diff(main, library, main_strings, lib_strings)
|
155
155
|
`git diff #{main}`.each_line do |line|
|
156
156
|
if line.start_with?('+ ') || line.start_with?('- ')
|
157
|
-
diffs = line.gsub(/\s+/m, ' ').strip.split
|
157
|
+
diffs = line.gsub(/\s+/m, ' ').strip.split
|
158
158
|
diffs.each do |diff|
|
159
159
|
verify_diff(diff, main_strings, lib_strings, library)
|
160
160
|
end
|
@@ -165,7 +165,7 @@ module Fastlane
|
|
165
165
|
def self.verify_pr_diff(main, library, main_strings, lib_strings, source_diff)
|
166
166
|
source_diff.each_line do |line|
|
167
167
|
if line.start_with?('+ ') || line.start_with?('- ')
|
168
|
-
diffs = line.gsub(/\s+/m, ' ').strip.split
|
168
|
+
diffs = line.gsub(/\s+/m, ' ').strip.split
|
169
169
|
diffs.each do |diff|
|
170
170
|
verify_diff(diff, main_strings, lib_strings, library)
|
171
171
|
end
|
@@ -299,6 +299,15 @@ module Fastlane
|
|
299
299
|
#
|
300
300
|
def self.apply_substitutions(tag)
|
301
301
|
tag.content = tag.content.gsub('...', '…')
|
302
|
+
|
303
|
+
# Typography en-dash
|
304
|
+
if tag.content.include?('-')
|
305
|
+
tag.content = tag.content.gsub(/(\d+\s*)-(\s*\d+)/) do |str|
|
306
|
+
match = Regexp.last_match # of type `MatchData`. match[0] == str == whole match, match[1] = 1st capture group (left part of the range), match[2] = second capture group (right part of the range)
|
307
|
+
is_negative_number = match[2][0] != ' ' && match[1][-1] == ' ' # if right part of range does not start with a space (e.g. `-3`), but left part of range does end with space, it's not a range after all but more likely a list containing negative numbers in it (e.g. `2 -3`)
|
308
|
+
is_negative_number ? str : "#{match[1]}\u{2013}#{match[2]}"
|
309
|
+
end
|
310
|
+
end
|
302
311
|
end
|
303
312
|
private_class_method :apply_substitutions
|
304
313
|
|
@@ -377,10 +377,10 @@ module Fastlane
|
|
377
377
|
found_section = false
|
378
378
|
File.open(file_path, 'r') do |file|
|
379
379
|
file.each_line do |line|
|
380
|
-
if
|
381
|
-
|
380
|
+
if found_section
|
381
|
+
return line.split[1] if line.include?(keyword) && !line.include?("\"#{keyword}\"") && !line.include?("P#{keyword}")
|
382
382
|
else
|
383
|
-
|
383
|
+
found_section = true if line.include?(section)
|
384
384
|
end
|
385
385
|
end
|
386
386
|
end
|
@@ -442,24 +442,24 @@ module Fastlane
|
|
442
442
|
version_updated = 0
|
443
443
|
File.open(gradle_path, 'r') do |file|
|
444
444
|
file.each_line do |line|
|
445
|
-
if
|
446
|
-
temp_file.puts line
|
447
|
-
found_section = true if line.include? section
|
448
|
-
else
|
445
|
+
if found_section
|
449
446
|
if version_updated < 2
|
450
447
|
if line.include?('versionName') && !line.include?('"versionName"') && !line.include?('PversionName')
|
451
|
-
version_name = line.split
|
448
|
+
version_name = line.split[1].tr('\"', '')
|
452
449
|
line.sub!(version_name, version[VERSION_NAME].to_s)
|
453
450
|
version_updated = version_updated + 1
|
454
451
|
end
|
455
452
|
|
456
453
|
if line.include? 'versionCode'
|
457
|
-
version_code = line.split
|
454
|
+
version_code = line.split[1]
|
458
455
|
line.sub!(version_code, version[VERSION_CODE].to_s)
|
459
456
|
version_updated = version_updated + 1
|
460
457
|
end
|
461
458
|
end
|
462
459
|
temp_file.puts line
|
460
|
+
else
|
461
|
+
temp_file.puts line
|
462
|
+
found_section = true if line.include? section
|
463
463
|
end
|
464
464
|
end
|
465
465
|
file.close
|
@@ -80,7 +80,7 @@ module Fastlane
|
|
80
80
|
|
81
81
|
Net::HTTP.start(command_uri.host, command_uri.port, use_ssl: true) do |http|
|
82
82
|
request = Net::HTTP::Post.new(command_uri.request_uri, headers)
|
83
|
-
body = {
|
83
|
+
body = { branch: branch, parameters: parameters }
|
84
84
|
request.body = body.to_json
|
85
85
|
response = http.request(request)
|
86
86
|
return response
|
@@ -187,7 +187,7 @@ module Fastlane
|
|
187
187
|
|
188
188
|
if File.directory?(abs_path)
|
189
189
|
Dir.glob("#{abs_path}**/*").map do |sub_path|
|
190
|
-
sub_path.gsub(repository_path
|
190
|
+
sub_path.gsub("#{repository_path}/", '')
|
191
191
|
end
|
192
192
|
else
|
193
193
|
return path
|
@@ -230,7 +230,7 @@ module Fastlane
|
|
230
230
|
end
|
231
231
|
|
232
232
|
new_config = self.configuration
|
233
|
-
new_config.add_file_to_copy(params[:source], params[:destination], params[:encrypt])
|
233
|
+
new_config.add_file_to_copy(params[:source], params[:destination], encrypt: params[:encrypt])
|
234
234
|
update_configuration(new_config)
|
235
235
|
end
|
236
236
|
|
@@ -50,15 +50,13 @@ module Fastlane
|
|
50
50
|
|
51
51
|
last_stone = nil
|
52
52
|
milestones.each do |mile|
|
53
|
+
mile_vcomps = mile[:title].split[0].split('.')
|
53
54
|
if last_stone.nil?
|
54
|
-
last_stone = mile unless
|
55
|
+
last_stone = mile unless mile_vcomps.length < 2
|
55
56
|
else
|
56
57
|
begin
|
57
|
-
|
58
|
-
|
59
|
-
elsif mile[:title].split(' ')[0].split('.')[1] > last_stone[:title].split(' ')[0].split('.')[1]
|
60
|
-
last_stone = mile
|
61
|
-
end
|
58
|
+
last_vcomps = last_stone[:title].split[0].split('.')
|
59
|
+
last_stone = mile if mile_vcomps[0] > last_vcomps[0] || mile_vcomps[1] > last_vcomps[1]
|
62
60
|
rescue StandardError
|
63
61
|
puts 'Found invalid milestone'
|
64
62
|
end
|
@@ -30,7 +30,7 @@ module Fastlane
|
|
30
30
|
print "Fetching info for: #{v.version_string.rjust(8)} (#{v.build.version.rjust(11)}) [#{idx.to_s.rjust(3)}/#{versions.count}]\r"
|
31
31
|
Spaceship::Tunes.client.build_details(app_id: app.id, train: v.version_string, build_number: v.build.version, platform: 'ios') rescue nil
|
32
32
|
end.compact.reverse
|
33
|
-
print(' ' * 55
|
33
|
+
print("#{' ' * 55}\n")
|
34
34
|
|
35
35
|
builds_details
|
36
36
|
end
|
@@ -40,12 +40,12 @@ module Fastlane
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def self.sz_mb(bytes)
|
43
|
-
sz(bytes).to_s.rjust(5)
|
43
|
+
"#{sz(bytes).to_s.rjust(5)} MB"
|
44
44
|
end
|
45
45
|
|
46
46
|
def self.format_csv(app_sizes, devices: nil)
|
47
47
|
devices = DEFAULT_DEVICES if devices.nil? || devices.empty?
|
48
|
-
csv = "Version\t
|
48
|
+
csv = "Version\t#{devices.join("\t")}\n"
|
49
49
|
app_sizes.each do |details|
|
50
50
|
build_number = details['cfBundleVersion']
|
51
51
|
sizes = details['sizesInBytes'].select { |name, _| devices.include?(name) }
|
@@ -9,8 +9,7 @@ module Fastlane
|
|
9
9
|
DEFAULT_BASE_LANG = 'en'
|
10
10
|
CONFIG_FILE_NAME = 'swiftgen-stringtypes.yml'
|
11
11
|
|
12
|
-
attr_reader :install_path
|
13
|
-
attr_reader :version
|
12
|
+
attr_reader :install_path, :version
|
14
13
|
|
15
14
|
# @param [String] install_path The path to install SwiftGen to. Usually something like "$PROJECT_DIR/vendor/swiftgen/#{SWIFTGEN_VERSION}".
|
16
15
|
# It's recommended to provide an absolute path here rather than a relative one, to ensure it's not dependant on where the action is run from.
|
@@ -175,7 +174,7 @@ module Fastlane
|
|
175
174
|
# Run diffs
|
176
175
|
base_file = sort_file_lines!(tmpdir, base_lang)
|
177
176
|
langs.delete(base_lang)
|
178
|
-
return
|
177
|
+
return langs.map do |lang|
|
179
178
|
file = sort_file_lines!(tmpdir, lang)
|
180
179
|
# If the lang ends up not having any translation at all (e.g. a `.lproj` without any `.strings` file in it but maybe just a storyboard or assets catalog), ignore it
|
181
180
|
next nil if file.nil? || only_empty_lines?(file)
|
@@ -189,7 +188,7 @@ module Fastlane
|
|
189
188
|
# file instead, but they can still give an indication at the index in the list of keys at which this difference is located.
|
190
189
|
diff.gsub!(/^(---|\+\+\+).*\n/, '')
|
191
190
|
diff.empty? ? nil : [lang, diff]
|
192
|
-
end.compact
|
191
|
+
end.compact.to_h
|
193
192
|
end
|
194
193
|
end
|
195
194
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'json'
|
2
|
-
require_relative 'file_reference
|
2
|
+
require_relative 'file_reference'
|
3
3
|
|
4
4
|
module Fastlane
|
5
5
|
class Configuration
|
@@ -22,7 +22,7 @@ module Fastlane
|
|
22
22
|
File.write(path, JSON.pretty_generate(to_hash))
|
23
23
|
end
|
24
24
|
|
25
|
-
def add_file_to_copy(source, destination, encrypt
|
25
|
+
def add_file_to_copy(source, destination, encrypt: false)
|
26
26
|
file = FileReference.new(file: source, destination: destination, encrypt: encrypt)
|
27
27
|
self.files_to_copy << file
|
28
28
|
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: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lorenzo Mattei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diffy
|
@@ -384,6 +384,7 @@ files:
|
|
384
384
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb
|
385
385
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_metadata.rb
|
386
386
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb
|
387
|
+
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_for_toolkit_updates_action.rb
|
387
388
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/circleci_trigger_job_action.rb
|
388
389
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb
|
389
390
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb
|
@@ -462,7 +463,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
462
463
|
requirements:
|
463
464
|
- - ">="
|
464
465
|
- !ruby/object:Gem::Version
|
465
|
-
version: '
|
466
|
+
version: '2.6'
|
466
467
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
467
468
|
requirements:
|
468
469
|
- - ">="
|