fastlane-plugin-wpmreleasetoolkit 12.3.4 → 12.5.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/an_localize_libs_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_avd_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_firebase_test.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_launch_emulator_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_send_app_size_metrics.rb +7 -5
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_shutdown_emulator_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_annotate_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_metadata_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_pipeline_upload_action.rb +3 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_trigger_build_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_for_toolkit_updates_action.rb +3 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/circleci_trigger_job_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/comment_on_pr.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/copy_branch_protection_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_github_release_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_backmerge_pull_request_action.rb +3 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb +18 -10
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/find_previous_tag.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/firebase_login.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/get_prs_between_tags.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/openai_ask_action.rb +143 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb +4 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/publish_github_release_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/remove_branch_protection_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/set_branch_protection_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/set_milestone_frozen_marker_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/update_assigned_milestone_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/upload_to_s3.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_add_files_to_copy_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_apply_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_setup_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_update_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_validate_action.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +5 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_download_strings_files_from_glotpress.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_store_app_sizes.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb +14 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_merge_strings_files.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb +5 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_emulator_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb +3 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_tools_path_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +6 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/app_size_metrics_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ci_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/configure_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/encryption_helper.rb +5 -7
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/filesystem_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/git_helper.rb +3 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/glotpress_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/interactive_prompt_reminder.rb +3 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_adc_app_sizes_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_linter_helper.rb +12 -8
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_strings_file_validation_helper.rb +3 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/metadata_block.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_metadata_block.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_short_metadata_block.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/standard_metadata_block.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/unknown_metadata_block.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/whats_new_metadata_block.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_download_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/release_notes_helper.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/user_agent.rb +3 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/app_version.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/build_code.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/configuration.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/file_reference.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/firebase_account.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/firebase_device.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/firebase_test_lab_result.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/firebase_test_runner.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/calculators/abstract_version_calculator.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/calculators/date_build_code_calculator.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/calculators/date_version_calculator.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/calculators/marketing_version_calculator.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/calculators/semantic_version_calculator.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/calculators/simple_build_code_calculator.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/files/android_version_file.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/files/ios_version_file.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/formatters/abstract_version_formatter.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/formatters/derived_build_code_formatter.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/formatters/four_part_build_code_formatter.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/formatters/four_part_version_formatter.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/formatters/rc_notation_version_formatter.rb +3 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/formatters/simple_build_code_formatter.rb +2 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit.rb +2 -0
- metadata +3 -2
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Fastlane
|
2
4
|
module Actions
|
3
5
|
class IosLintLocalizationsAction < Action
|
@@ -35,7 +37,8 @@ module Fastlane
|
|
35
37
|
helper.run(
|
36
38
|
input_dir: resolve_path(params[:input_dir]),
|
37
39
|
base_lang: params[:base_lang],
|
38
|
-
only_langs: params[:only_langs]
|
40
|
+
only_langs: params[:only_langs],
|
41
|
+
fail_on_strings_not_in_base_language: params[:fail_on_strings_not_in_base_language]
|
39
42
|
)
|
40
43
|
end
|
41
44
|
|
@@ -68,7 +71,7 @@ module Fastlane
|
|
68
71
|
duplicate_keys
|
69
72
|
end
|
70
73
|
|
71
|
-
RETRY_MESSAGE = <<~MSG
|
74
|
+
RETRY_MESSAGE = <<~MSG
|
72
75
|
Inconsistencies found during Localization linting.
|
73
76
|
You need to fix them before continuing. From this point on, you should either:
|
74
77
|
|
@@ -91,7 +94,7 @@ module Fastlane
|
|
91
94
|
Did you fix the `.strings` files locally and want to lint them again?
|
92
95
|
MSG
|
93
96
|
|
94
|
-
ABORT_MESSAGE = <<~MSG
|
97
|
+
ABORT_MESSAGE = <<~MSG
|
95
98
|
Inconsistencies found during Localization linting. Aborting.
|
96
99
|
MSG
|
97
100
|
|
@@ -181,6 +184,14 @@ module Fastlane
|
|
181
184
|
default_value: true,
|
182
185
|
type: Boolean
|
183
186
|
),
|
187
|
+
FastlaneCore::ConfigItem.new(
|
188
|
+
key: :fail_on_strings_not_in_base_language,
|
189
|
+
env_name: 'FL_IOS_LINT_TRANSLATIONS_FAIL_ON_STRINGS_NOT_IN_BASE_LANGUAGE',
|
190
|
+
description: 'Should we report violations when finding strings in translations that are not present in the base language',
|
191
|
+
optional: true,
|
192
|
+
default_value: true,
|
193
|
+
type: Boolean
|
194
|
+
),
|
184
195
|
]
|
185
196
|
end
|
186
197
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'plist'
|
2
4
|
require_relative '../../helper/app_size_metrics_helper'
|
3
5
|
|
@@ -5,9 +7,9 @@ module Fastlane
|
|
5
7
|
module Actions
|
6
8
|
class IosSendAppSizeMetricsAction < Action
|
7
9
|
# Keys used by the metrics payload
|
8
|
-
IPA_FILE_SIZE_KEY = 'File Size'
|
9
|
-
IPA_DOWNLOAD_SIZE_KEY = 'Download Size'
|
10
|
-
IPA_INSTALL_SIZE_KEY = 'Install Size'
|
10
|
+
IPA_FILE_SIZE_KEY = 'File Size' # value from `File.size` of the Universal `.ipa`
|
11
|
+
IPA_DOWNLOAD_SIZE_KEY = 'Download Size' # value from `app-thinning.plist`
|
12
|
+
IPA_INSTALL_SIZE_KEY = 'Install Size' # value from `app-thinning.plist`
|
11
13
|
|
12
14
|
def self.run(params)
|
13
15
|
# Check input parameters
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'fastlane_core/ui/ui'
|
2
4
|
require 'fileutils'
|
3
5
|
require 'nokogiri'
|
@@ -9,7 +11,7 @@ module Fastlane
|
|
9
11
|
module Helper
|
10
12
|
module Android
|
11
13
|
module LocalizeHelper
|
12
|
-
LIB_SOURCE_XML_ATTR = 'a8c-src-lib'
|
14
|
+
LIB_SOURCE_XML_ATTR = 'a8c-src-lib'
|
13
15
|
|
14
16
|
# Checks if `string_node` has the `content_override` flag set
|
15
17
|
def self.skip_string_by_tag?(string_node)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Fastlane
|
2
4
|
module Helper
|
3
5
|
module Android
|
@@ -5,9 +7,9 @@ module Fastlane
|
|
5
7
|
#
|
6
8
|
module VersionHelper
|
7
9
|
# The key used in internal version Hash objects to hold the versionName value
|
8
|
-
VERSION_NAME = 'name'
|
10
|
+
VERSION_NAME = 'name'
|
9
11
|
# The key used in internal version Hash objects to hold the versionCode value
|
10
|
-
VERSION_CODE = 'code'
|
12
|
+
VERSION_CODE = 'code'
|
11
13
|
# The index for the major version number part
|
12
14
|
MAJOR_NUMBER = 0
|
13
15
|
# The index for the minor version number part
|
@@ -15,9 +17,9 @@ module Fastlane
|
|
15
17
|
# The index for the hotfix version number part
|
16
18
|
HOTFIX_NUMBER = 2
|
17
19
|
# The prefix used in front of the versionName for alpha versions
|
18
|
-
ALPHA_PREFIX = 'alpha-'
|
20
|
+
ALPHA_PREFIX = 'alpha-'
|
19
21
|
# The suffix used in the versionName for RC (beta) versions
|
20
|
-
RC_SUFFIX = '-rc'
|
22
|
+
RC_SUFFIX = '-rc'
|
21
23
|
|
22
24
|
# Extract the version name and code from the release version of the app from `version.properties file`
|
23
25
|
#
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'openssl'
|
2
4
|
|
3
5
|
module Fastlane
|
@@ -19,23 +21,19 @@ module Fastlane
|
|
19
21
|
|
20
22
|
def self.encrypt(plain_text, key)
|
21
23
|
# Ensure consistent encoding
|
22
|
-
plain_text.force_encoding(Encoding::UTF_8)
|
24
|
+
sanitized_plain_text = plain_text.dup.force_encoding(Encoding::UTF_8)
|
23
25
|
|
24
26
|
cipher = cipher(OperationType::ENCRYPT)
|
25
27
|
cipher.key = key
|
26
28
|
|
27
|
-
|
28
|
-
encrypted << cipher.final
|
29
|
-
|
30
|
-
encrypted
|
29
|
+
cipher.update(sanitized_plain_text) + cipher.final
|
31
30
|
end
|
32
31
|
|
33
32
|
def self.decrypt(encrypted, key)
|
34
33
|
cipher = cipher(OperationType::DECRYPT)
|
35
34
|
cipher.key = key
|
36
35
|
|
37
|
-
decrypted = cipher.update(encrypted)
|
38
|
-
decrypted << cipher.final
|
36
|
+
decrypted = cipher.update(encrypted) + cipher.final
|
39
37
|
|
40
38
|
# Ensure consistent encoding
|
41
39
|
decrypted.force_encoding(Encoding::UTF_8)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'git'
|
2
4
|
|
3
5
|
module Fastlane
|
@@ -6,7 +8,7 @@ module Fastlane
|
|
6
8
|
#
|
7
9
|
module GitHelper
|
8
10
|
# Fallback default branch of the client repository.
|
9
|
-
DEFAULT_GIT_BRANCH = 'trunk'
|
11
|
+
DEFAULT_GIT_BRANCH = 'trunk'
|
10
12
|
|
11
13
|
# Checks if the given path, or current directory if no path is given, is inside a Git repository
|
12
14
|
#
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'fastlane_core'
|
2
4
|
|
3
5
|
# The features in this file are controlled by the following ENV vars:
|
@@ -24,7 +26,7 @@ require 'fastlane_core'
|
|
24
26
|
module FastlaneCore
|
25
27
|
# NOTE: FastlaneCore::UI delegates to the FastlaneCore::Shell implementation when output is the terminal
|
26
28
|
class Shell
|
27
|
-
DEFAULT_PROMPT_REMINDER_MESSAGE = 'An interactive prompt is waiting for you in the Terminal!'
|
29
|
+
DEFAULT_PROMPT_REMINDER_MESSAGE = 'An interactive prompt is waiting for you in the Terminal!'
|
28
30
|
DEFAULT_PROMPT_REMINDER_DELAYS = [30, 180, 600].freeze
|
29
31
|
|
30
32
|
# Calls the block given and remind the user with a vocal message if the block does not return after specific delays.
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'yaml'
|
2
4
|
require 'tmpdir'
|
3
5
|
|
@@ -5,9 +7,9 @@ module Fastlane
|
|
5
7
|
module Helper
|
6
8
|
module Ios
|
7
9
|
class L10nLinterHelper
|
8
|
-
SWIFTGEN_VERSION = '6.6.2'
|
9
|
-
DEFAULT_BASE_LANG = 'en'
|
10
|
-
CONFIG_FILE_NAME = 'swiftgen-stringtypes.yml'
|
10
|
+
SWIFTGEN_VERSION = '6.6.2'
|
11
|
+
DEFAULT_BASE_LANG = 'en'
|
12
|
+
CONFIG_FILE_NAME = 'swiftgen-stringtypes.yml'
|
11
13
|
|
12
14
|
attr_reader :install_path, :version
|
13
15
|
|
@@ -58,11 +60,12 @@ module Fastlane
|
|
58
60
|
#
|
59
61
|
# @param [String] input_dir The path (ideally absolute) to the directory containing the `.lproj` folders to parse
|
60
62
|
# @param [String] base_lang The code name (i.e the basename of one of the `.lproj` folders) of the locale to use as the baseline
|
63
|
+
# @param [String] fail_on_strings_not_in_base_language Whether to fail on strings not in base language
|
61
64
|
# @return [Hash<String, Array<String>>] A hash of violations, keyed by language code, whose values are the list of violation messages for that language
|
62
65
|
#
|
63
|
-
def run(input_dir:, base_lang: DEFAULT_BASE_LANG, only_langs: nil)
|
66
|
+
def run(input_dir:, base_lang: DEFAULT_BASE_LANG, only_langs: nil, fail_on_strings_not_in_base_language: true)
|
64
67
|
check_swiftgen_installed || install_swiftgen!
|
65
|
-
find_diffs(input_dir: input_dir, base_lang: base_lang, only_langs: only_langs)
|
68
|
+
find_diffs(input_dir: input_dir, base_lang: base_lang, only_langs: only_langs, fail_on_strings_not_in_base_language: fail_on_strings_not_in_base_language)
|
66
69
|
end
|
67
70
|
|
68
71
|
##################
|
@@ -158,11 +161,12 @@ module Fastlane
|
|
158
161
|
# @param [String] input_dir The directory where the `.lproj` folders to scan are located
|
159
162
|
# @param [String] base_lang The base language used as source of truth that all other languages will be compared against
|
160
163
|
# @param [Array<String>] only_langs The list of languages to limit the generation for. Useful to focus only on a couple of issues or just one language
|
164
|
+
# @param [Boolean] fail_on_strings_not_in_base_language Whether to fail on strings not in base language
|
161
165
|
# @return [Hash<String, Array<String>>] A hash of violations, keyed by language code, whose values are the list of violation messages for that language
|
162
166
|
#
|
163
167
|
# @note The returned Hash contains keys only for locales with violations. Locales parsed but without any violations found will not appear in the resulting hash.
|
164
168
|
#
|
165
|
-
def find_diffs(input_dir:, base_lang:, only_langs: nil)
|
169
|
+
def find_diffs(input_dir:, base_lang:, only_langs: nil, fail_on_strings_not_in_base_language: true)
|
166
170
|
Dir.mktmpdir('a8c-lint-translations-') do |tmpdir|
|
167
171
|
# Run SwiftGen
|
168
172
|
langs = only_langs.nil? ? nil : (only_langs + [base_lang]).uniq
|
@@ -179,8 +183,8 @@ module Fastlane
|
|
179
183
|
next nil if params_for_lang.nil? || params_for_lang.empty?
|
180
184
|
|
181
185
|
violations = params_for_lang.map do |key, param_types|
|
182
|
-
next "`#{key}` was unexpected, as it is not present in the base locale." if params_for_base_lang[key].nil?
|
183
|
-
next "`#{key}` expected placeholders for #{params_for_base_lang[key]} but found #{param_types} instead." if params_for_base_lang[key] != param_types
|
186
|
+
next "`#{key}` was unexpected, as it is not present in the base locale." if params_for_base_lang[key].nil? && fail_on_strings_not_in_base_language
|
187
|
+
next "`#{key}` expected placeholders for #{params_for_base_lang[key]} but found #{param_types} instead." if !params_for_base_lang[key].nil? && params_for_base_lang[key] != param_types
|
184
188
|
end.compact
|
185
189
|
|
186
190
|
[lang, violations] unless violations.empty?
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Fastlane
|
2
4
|
module Helper
|
3
5
|
module Ios
|
@@ -34,7 +36,7 @@ module Fastlane
|
|
34
36
|
in_quoted_key: {
|
35
37
|
'"' => lambda do |state, _|
|
36
38
|
state.found_key = state.buffer.string.dup
|
37
|
-
state.buffer
|
39
|
+
state.buffer = StringIO.new
|
38
40
|
:after_quoted_key_before_eq
|
39
41
|
end,
|
40
42
|
/./u => lambda do |state, c|
|
@@ -1,5 +1,7 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Fastlane
|
2
4
|
module Wpmreleasetoolkit
|
3
|
-
USER_AGENT = 'Automattic App Release Automator; https://github.com/wordpress-mobile/release-toolkit/'
|
5
|
+
USER_AGENT = 'Automattic App Release Automator; https://github.com/wordpress-mobile/release-toolkit/'
|
4
6
|
end
|
5
7
|
end
|
data/lib/fastlane/plugin/wpmreleasetoolkit/versioning/formatters/rc_notation_version_formatter.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'abstract_version_formatter'
|
2
4
|
|
3
5
|
module Fastlane
|
@@ -7,7 +9,7 @@ module Fastlane
|
|
7
9
|
# formatter for apps that may use versions in the format of `1.2.3-rc-4`.
|
8
10
|
class RCNotationVersionFormatter < AbstractVersionFormatter
|
9
11
|
# The string identifier used for beta versions in Android.
|
10
|
-
RC_SUFFIX = 'rc'
|
12
|
+
RC_SUFFIX = 'rc'
|
11
13
|
|
12
14
|
# Parse the version string into an AppVersion instance
|
13
15
|
#
|