diff --git a/CHANGELOG.md b/CHANGELOG.md index cfc98e2a0..b1f8a42e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ _None_ - Update `danger` to `9.3.0`. This is an internal-only change and is not a breaking change for clients. [#464] - Replace `rspec-buildkite-analytics` with `buildkite-test_collector` (Buildkite renamed the gem) and update it to `2.2.0`. This is another internal-only change and is not a breaking change for clients. [#465] - Adds `ignore_pipeline_branch_filters=true` parameter to the API call triggering a Buildkite build [#468] +- Replace all instances of `is_string` with `type` [#469] ## 7.0.0 diff --git a/Gemfile.lock b/Gemfile.lock index 10c6d91c3..5982e3032 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -413,7 +413,7 @@ PLATFORMS ruby DEPENDENCIES - buildkite-test_collector (~> 2.1) + buildkite-test_collector (~> 2.2) bundler (~> 2.0) cocoapods (~> 1.10) codecov diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb index 186b7cef7..dce29cd73 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb @@ -131,7 +131,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :po_file_path, env_name: 'FL_UPDATE_METADATA_SOURCE_PO_FILE_PATH', description: 'The path of the .po file to update', - is_string: true, + type: String, verify_block: proc do |value| UI.user_error!("No .po file path for UpdateMetadataSourceAction given, pass using `po_file_path: 'file path'`") unless value && (!value.empty?) UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value) @@ -145,7 +145,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :source_files, env_name: 'FL_UPDATE_METADATA_SOURCE_SOURCE_FILES', description: 'The hash with the path to the source files and the key to use to include their content', - is_string: false, + type: Hash, verify_block: proc do |value| UI.user_error!("No source file hash for UpdateMetadataSourceAction given, pass using `source_files: 'source file hash'`") unless value && (!value.empty?) end), diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb index e1f9c9e33..528b6e64c 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb @@ -33,7 +33,19 @@ def self.return_value end def self.details - 'Checks that the strings to be localised are updated from the libs into the main application file' + <<~DETAILS + Checks that the strings to be localised are updated from the libs into the main application file + + For the `lib_strings_path` ConfigItem, it is an array of Hashes, each describing a library and + containing these specific keys: + - `:library`: The human readable name of the library, used to display in console messages + - `:strings_path`: The path to the strings.xml file of the library to merge into the main one + - `:exclusions`: An array of strings keys to exclude during merge. Any of those keys from the + library's `strings.xml` will be skipped and won't be merged into the main one. + - `:source_id`: An optional `String` which will be added as the `a8c-src-lib` XML attribute + to strings coming from this library, to help identify their source in the merged file. + - `:add_ignore_attr`: If set to `true`, will add `tools:ignore="UnusedResources"` to merged strings. + DETAILS end def self.available_options @@ -41,17 +53,17 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :app_strings_path, description: 'The path of the main strings file', optional: false, - is_string: true), + type: String), FastlaneCore::ConfigItem.new(key: :libs_strings_path, env_name: 'CHECK_LIBS_STRINGS_PATH', - description: 'The list of libs to merge', + description: 'The list of libs to merge. This should be an array of Hashes.', optional: false, - is_string: false), + type: Array), FastlaneCore::ConfigItem.new(key: :diff_url, env_name: 'CHECK_LIBS_DIFF_URL', description: 'The url of the diff to check', optional: true, - is_string: true), + type: String), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb index 3644b3ae7..0fc2ee3dc 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb @@ -74,12 +74,12 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :base_version, env_name: 'FL_ANDROID_BETABUILD_PRECHECKS_BASE_VERSION', description: 'The version to work on', # a short description of this parameter - is_string: true, + type: String, optional: true), # true: verifies the input is a string, false: every kind of value), FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_ANDROID_BETABUILD_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation', - is_string: false, # true: verifies the input is a string, false: every kind of value + type: Boolean, default_value: false), # the default value if the user didn't provide one FastlaneCore::ConfigItem.new(key: :default_branch, env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH', diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb index 91cf3d2b1..972db99e2 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb @@ -46,22 +46,22 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_ANDROID_BUILD_PRECHECKS_SKIP_CONFIRM', description: 'True to avoid the system ask for confirmation', - is_string: false, + type: Boolean, default_value: false), FastlaneCore::ConfigItem.new(key: :alpha, env_name: 'FL_ANDROID_BUILD_PRECHECKS_ALPHA_BUILD', description: 'True if this is for an alpha build', - is_string: false, + type: Boolean, default_value: false), FastlaneCore::ConfigItem.new(key: :beta, env_name: 'FL_ANDROID_BUILD_PRECHECKS_BETA_BUILD', description: 'True if this is for a beta build', - is_string: false, + type: Boolean, default_value: false), FastlaneCore::ConfigItem.new(key: :final, env_name: 'FL_ANDROID_BUILD_PRECHECKS_FINAL_BUILD', description: 'True if this is for a final build', - is_string: false, + type: Boolean, default_value: false), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb index 81e15bade..9d6e5e693 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb @@ -43,14 +43,14 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :version_name, env_name: 'FL_ANDROID_BUMP_VERSION_HOTFIX_VERSION', description: 'The version name for the hotfix', - is_string: true), + type: String), FastlaneCore::ConfigItem.new(key: :version_code, env_name: 'FL_ANDROID_BUMP_VERSION_HOTFIX_CODE', description: 'The version code for the hotfix'), FastlaneCore::ConfigItem.new(key: :previous_version_name, env_name: 'FL_ANDROID_BUMP_VERSION_HOTFIX_PREVIOUS_VERSION', description: 'The version to branch from', - is_string: true), + type: String), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb index 0dc7d7387..2cc6d28bf 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb @@ -57,7 +57,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_ANDROID_CODEFREEZE_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation before codefreeze', - is_string: false, # true: verifies the input is a string, false: every kind of value + type: Boolean, default_value: false), # the default value if the user didn't provide one FastlaneCore::ConfigItem.new(key: :default_branch, env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH', diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb index c40c3fb99..8217d8183 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb @@ -40,7 +40,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_ANDROID_COMPLETECODEFREEZE_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation', - is_string: false, # true: verifies the input is a string, false: every kind of value + type: Boolean, default_value: false), # the default value if the user didn't provide one ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb index 5fbeb74bb..656fb6fa1 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb @@ -38,16 +38,16 @@ def self.available_options env_name: 'ANDROID_XML_NOTES_DOWNLOAD_PATH', description: 'The path to the folder with the release notes', optional: false, - is_string: true), + type: String), FastlaneCore::ConfigItem.new(key: :build_number, env_name: 'ANDROID_XML_NOTES_BUILD_NUMBER', description: 'The build number of the release notes', optional: false, - is_string: true), + type: String), FastlaneCore::ConfigItem.new(key: :locales, env_name: 'FL_DOWNLOAD_METADATA_LOCALES', description: 'The hash with the GLotPress locale and the project locale association', - is_string: false), + type: Hash), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb index 1d30afb64..dd7e583f6 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb @@ -91,7 +91,7 @@ def self.available_options key: :skip_commit, env_name: 'FL_DOWNLOAD_TRANSLATIONS_SKIP_COMMIT', description: 'If set to true, will skip the commit/push step. Otherwise, it will commit the changes and push them (the default)', - is_string: false, # Boolean + type: Boolean, default_value: false ), ] diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb index 3b293fef1..da3619bc9 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb @@ -47,7 +47,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_ANDROID_FINALIZE_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation', - is_string: false, # true: verifies the input is a string, false: every kind of value + type: Boolean, default_value: false), # the default value if the user didn't provide one ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotfix_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotfix_prechecks.rb index f9a5bbfc6..6f22e6fae 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotfix_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotfix_prechecks.rb @@ -51,11 +51,11 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :version_name, env_name: 'FL_ANDROID_HOTFIX_PRECHECKS_VERSION', description: 'The hotfix version number to create', - is_string: true), + type: String), FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_ANDROID_HOTFIX_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation', - is_string: false, # Boolean + type: Boolean, default_value: false), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb index deea5e181..afda0bf91 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb @@ -28,7 +28,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :tag_alpha, env_name: 'FL_ANDROID_TAG_BUILD_ALPHA', description: 'True to skip tagging the alpha version', - is_string: false, + type: Boolean, default_value: true), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb index 2f00ad9f2..86339a91c 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb @@ -34,11 +34,11 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :new_version, env_name: 'FL_ANDROID_UPDATE_RELEASE_NOTES_VERSION', description: 'The version we are currently freezing; An empty entry for the _next_ version after this one will be added to the release notes', - is_string: true), + type: String), FastlaneCore::ConfigItem.new(key: :release_notes_file_path, env_name: 'FL_ANDROID_UPDATE_RELEASE_NOTES_FILE_PATH', description: 'The path to the release notes file to be updated', - is_string: true, + type: String, default_value: File.join(ENV['PROJECT_ROOT_FOLDER'] || '.', 'RELEASE-NOTES.txt')), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_for_toolkit_updates_action.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_for_toolkit_updates_action.rb index cf2ecf0d4..2c1d08519 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_for_toolkit_updates_action.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_for_toolkit_updates_action.rb @@ -86,7 +86,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :skip_update_suggestion, env_name: 'CHECK_FOR_TOOLKIT_UPDATES_SKIP_UPDATE_SUGGESTION', description: 'If true, will still check for new versions, but will not ask if you want to run bundle update if an update is found', - is_string: false, # Boolean + type: Boolean, default_value: false), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb index b793be6f3..059d31398 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb @@ -125,13 +125,13 @@ def self.available_options description: 'Should we abort with a global error if any violations are found?', optional: true, default_value: true, - is_string: false), + type: Boolean), FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_CHECK_TRANSLATION_SKIP_CONFIRM', description: 'Move ahead without requesting confirmation if violations are found. Only works if "abort_on_violations" is disabled', optional: true, default_value: false, - is_string: false), + type: Boolean), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb index 0265ba278..d981603f6 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb @@ -62,19 +62,19 @@ def self.available_options env_name: 'GHHELPER_NEED_APPSTORE_SUBMISSION', description: 'True if the app needs to be submitted', optional: true, - is_string: false, + type: Boolean, default_value: false), FastlaneCore::ConfigItem.new(key: :milestone_duration, env_name: 'GHHELPER_MILESTONE_DURATION', description: 'Milestone duration in number of days', optional: true, - is_string: false, + type: Integer, default_value: 14), FastlaneCore::ConfigItem.new(key: :number_of_days_from_code_freeze_to_release, env_name: 'GHHELPER_NUMBER_OF_DAYS_FROM_CODE_FREEZE_TO_RELEASE', description: 'Number of days from code freeze to release', optional: true, - is_string: false, + type: Integer, default_value: 14), Fastlane::Helper::GithubHelper.github_token_config_item, ] diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_action.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_action.rb index 0fdfd8a0d..9f5115bc0 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_action.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_action.rb @@ -84,7 +84,7 @@ def self.available_options description: 'True if this is a pre-release', optional: true, default_value: false, - is_string: false), + type: Boolean), FastlaneCore::ConfigItem.new(key: :is_draft, env_name: 'GHHELPER_CREATE_RELEASE_IS_DRAFT', description: 'True to create the GitHub release as a draft (instead of publishing it immediately)', diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb index 6e9d58295..2b3e6a003 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb @@ -67,17 +67,17 @@ def self.available_options env_name: 'GHHELPER_EXTRACT_NOTES_VERSION', description: 'The version of the release', optional: false, - is_string: true), + type: String), FastlaneCore::ConfigItem.new(key: :release_notes_file_path, env_name: 'GHHELPER_EXTRACT_NOTES_FILE_PATH', description: 'The path to the file that contains the release notes', optional: false, - is_string: true), + type: String), FastlaneCore::ConfigItem.new(key: :extracted_notes_file_path, env_name: 'GHHELPER_EXTRACT_NOTES_EXTRACTED_FILE_PATH', description: 'The path to the file that will contain the extracted release notes', optional: true, - is_string: true), + type: String), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/get_prs_list_action.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/get_prs_list_action.rb index 7b9a40e55..8ed920944 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/get_prs_list_action.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/get_prs_list_action.rb @@ -49,11 +49,11 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :report_path, description: 'The path where the list of PRs should be written to', optional: false, - is_string: true), + type: String), FastlaneCore::ConfigItem.new(key: :milestone, description: 'The name of the milestone we want to fetch the list of PRs for (e.g.: `16.9`)', optional: false, - is_string: true), + type: String), Fastlane::Helper::GithubHelper.github_token_config_item, ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb index 1c2c741e8..dbe5e2f43 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb @@ -55,11 +55,11 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :target_files, env_name: 'FL_DOWNLOAD_METADATA_TARGET_FILES', description: 'The hash with the path to the target files and the key to use to extract their content', - is_string: false), + type: Hash), FastlaneCore::ConfigItem.new(key: :locales, env_name: 'FL_DOWNLOAD_METADATA_LOCALES', description: 'The hash with the GlotPress locale and the project locale association', - is_string: false), + type: Hash), FastlaneCore::ConfigItem.new(key: :source_locale, env_name: 'FL_DOWNLOAD_METADATA_SOURCE_LOCALE', description: 'The source locale code', @@ -67,7 +67,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :download_path, env_name: 'FL_DOWNLOAD_METADATA_DOWNLOAD_PATH', description: 'The path of the target files', - is_string: true), + type: String), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb index 70c51696f..d1d6bb24a 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb @@ -130,7 +130,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :po_file_path, env_name: 'FL_UPDATE_METADATA_SOURCE_PO_FILE_PATH', description: 'The path of the .po file to update', - is_string: true, + type: String, verify_block: proc do |value| UI.user_error!("No .po file path for UpdateMetadataSourceAction given, pass using `po_file_path: 'file path'`") unless value && (!value.empty?) UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value) @@ -144,7 +144,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :source_files, env_name: 'FL_UPDATE_METADATA_SOURCE_SOURCE_FILES', description: 'The hash with the path to the source files and the key to use to include their content', - is_string: false, + type: Hash, verify_block: proc do |value| UI.user_error!("No source file hash for UpdateMetadataSourceAction given, pass using `source_files: 'source file hash'`") unless value && (!value.empty?) end), diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setfrozentag_action.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setfrozentag_action.rb index 55d6f8a89..1300b7406 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setfrozentag_action.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setfrozentag_action.rb @@ -68,10 +68,10 @@ def self.available_options optional: false, type: String), FastlaneCore::ConfigItem.new(key: :freeze, - description: 'The GitHub milestone', + description: 'If true, the action will add the ❄️ emoji to the milestone title', optional: false, default_value: true, - is_string: false), + type: Boolean), Fastlane::Helper::GithubHelper.github_token_config_item, ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_apply_action.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_apply_action.rb index acafc4dc9..fb89bde9d 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_apply_action.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_apply_action.rb @@ -127,7 +127,7 @@ def self.available_options description: 'Overwrite copied files without confirmation', optional: true, default_value: false, - is_string: false), + type: Boolean), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb index 280a91d1e..5da8a9be6 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb @@ -43,13 +43,13 @@ def self.available_options [ FastlaneCore::ConfigItem.new(key: :app_identifier, description: 'List of App Identifiers that should contain the new device identifier', - is_string: false, + type: Array, verify_block: proc do |value| UI.user_error!('You must provide an array of bundle identifiers in `app_identifier`') if value.empty? end), FastlaneCore::ConfigItem.new(key: :team_id, description: 'The team_id for the provisioning profiles', - is_string: true, + type: String, verify_block: proc do |value| UI.user_error!('You must provide a team ID in `team_id`') unless value && (!value.empty?) end), diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb index 7a7cfa017..2390b4308 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb @@ -42,7 +42,7 @@ def self.available_options FastlaneCore::ConfigItem.new( key: :app_identifier, description: 'List of App Identifiers that should contain the new device identifier', - is_string: false, + type: Array, verify_block: proc do |value| UI.user_error!('You must provide an array of bundle identifiers in `app_identifier`') if value.empty? end @@ -50,7 +50,7 @@ def self.available_options FastlaneCore::ConfigItem.new( key: :team_id, description: 'The team_id for the provisioning profiles', - is_string: true, + type: String, verify_block: proc do |value| UI.user_error!('You must provide a team ID in `team_id`') unless value && (!value.empty?) end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb index 7d6ee6e69..41f0f9379 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb @@ -63,12 +63,12 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :base_version, env_name: 'FL_IOS_BETABUILD_PRECHECKS_BASE_VERSION', description: 'The version to work on', # a short description of this parameter - is_string: true, - optional: true), # true: verifies the input is a string, false: every kind of value), + type: String, + optional: true), FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_IOS_BETABUILD_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation', - is_string: false, # true: verifies the input is a string, false: every kind of value + type: Boolean, default_value: false), # the default value if the user didn't provide one FastlaneCore::ConfigItem.new(key: :default_branch, env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH', diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb index 142da9088..b05d93cbe 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb @@ -36,22 +36,22 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_IOS_BUILD_PRECHECKS_SKIP_CONFIRM', description: 'True to avoid the system ask for confirmation', - is_string: false, + type: Boolean, default_value: false), FastlaneCore::ConfigItem.new(key: :internal, env_name: 'FL_IOS_BUILD_PRECHECKS_INTERNAL_BUILD', description: 'True if this is for an internal build', - is_string: false, + type: Boolean, default_value: false), FastlaneCore::ConfigItem.new(key: :external, env_name: 'FL_IOS_BUILD_PRECHECKS_EXTERNAL_BUILD', description: 'True if this is for a public build', - is_string: false, + type: Boolean, default_value: false), FastlaneCore::ConfigItem.new(key: :internal_on_single_version, env_name: 'FL_IOS_BUILD_PRECHECKS_INTERNAL_SV_BUILD', description: 'True if this is for an internal build that follows the same versioning of the external', - is_string: false, + type: Boolean, default_value: false), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb index be37485b3..7a28fdd3d 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb @@ -53,7 +53,7 @@ def self.available_options FastlaneCore::ConfigItem.new( key: :derived_data_path, description: "The path to the DerivedData directory for the project. Should match what's used in the `gym` action", - is_string: true, + type: String, default_value: '~/Library/Developer/Xcode/DerivedData' ), ] diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb index aa6ff18dc..d185b919c 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb @@ -43,19 +43,19 @@ def self.available_options key: :version, env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_VERSION', description: 'The version of the hotfix', - is_string: true + type: String ), FastlaneCore::ConfigItem.new( key: :previous_version, env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_PREVIOUS_VERSION', description: 'The version to branch from', - is_string: true + type: String ), FastlaneCore::ConfigItem.new( key: :skip_deliver, env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_SKIP_DELIVER', description: 'Skips Deliverfile key update', - is_string: false, # Boolean parameter + type: Boolean, optional: true, # Don't skip the Deliverfile by default. At the time of writing, 2 out of 3 consumers # still have a Deliverfile. diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb index da41c4d40..af642cfeb 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb @@ -39,7 +39,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :podfile, env_name: 'FL_IOS_CHECKBETADEPS_PODFILE', description: 'Path to the Podfile to analyse', - is_string: true), + type: String), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_clear_intermediate_tags.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_clear_intermediate_tags.rb index 441557e2e..75ab1ac61 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_clear_intermediate_tags.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_clear_intermediate_tags.rb @@ -38,7 +38,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :version, env_name: 'FL_IOS_CLEAN_INTERMEDIATE_TAGS_VERSION', description: 'The version of the tags to clear', - is_string: true), + type: String), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb index a4ce3d631..3c7102542 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb @@ -47,7 +47,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_IOS_CODEFREEZE_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation before codefreeze', - is_string: false, # true: verifies the input is a string, false: every kind of value + type: Boolean, default_value: false), # the default value if the user didn't provide one FastlaneCore::ConfigItem.new(key: :default_branch, env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH', diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb index f340a8771..701bcaed0 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb @@ -40,7 +40,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_IOS_COMPLETECODEFREEZE_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation', - is_string: false, # true: verifies the input is a string, false: every kind of value + type: Boolean, default_value: false), # the default value if the user didn't provide one ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_final_tag.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_final_tag.rb index fa06e2248..2a575707f 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_final_tag.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_final_tag.rb @@ -30,7 +30,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :version, env_name: 'FL_IOS_FINAL_TAG_VERSION', description: 'The version of the release to finalize', - is_string: true), + type: String), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb index dd2de41bf..3ceac70ac 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb @@ -40,7 +40,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_IOS_FINALIZE_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation', - is_string: false, # true: verifies the input is a string, false: every kind of value + type: Boolean, default_value: false), # the default value if the user didn't provide one ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb index 18fc5f02b..a60944dd9 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb @@ -74,12 +74,12 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :quiet, env_name: 'FL_IOS_GENERATE_STRINGS_FILE_FROM_CODE_QUIET', description: 'In quiet mode, `genstrings` will log warnings about duplicate values, but not about duplicate comments', - is_string: false, # Boolean + type: Boolean, default_value: true), FastlaneCore::ConfigItem.new(key: :swiftui, env_name: 'FL_IOS_GENERATE_STRINGS_FILE_FROM_CODE_SWIFTUI', description: "Should we include SwiftUI's `Text()` when parsing code with `genstrings`", - is_string: false, # Boolean + type: Boolean, default_value: false), FastlaneCore::ConfigItem.new(key: :output_dir, env_name: 'FL_IOS_GENERATE_STRINGS_FILE_FROM_CODE_OUTPUT_DIR', @@ -88,7 +88,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :fail_on_error, env_name: 'FL_IOS_GENERATE_STRINGS_FILE_FROM_CODE_FAIL_ON_ERROR', description: 'If true, will fail with user_error! if `genstrings` printed any error while parsing', - is_string: false, # Boolean + type: Boolean, default_value: true), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb index a6dc76f04..1609149ef 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb @@ -32,7 +32,7 @@ def self.available_options key: :internal, env_name: 'FL_IOS_BUILD_VERSION_INTERNAL', description: 'If true, returns the internal build version, otherwise returns the public one', - is_string: false, # Boolean + type: Boolean, default_value: false ), ] diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb index df05ae777..d93a86b1a 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb @@ -51,11 +51,11 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :version, env_name: 'FL_IOS_HOTFIX_PRECHECKS_VERSION', description: 'The version to work on', # a short description of this parameter - is_string: true), + type: String), FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_IOS_HOTFIX_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation', - is_string: false, # true: verifies the input is a string, false: every kind of value + type: Boolean, default_value: false), # the default value if the user didn't provide one ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb index 153caae08..c8e43a910 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb @@ -163,7 +163,7 @@ def self.available_options description: 'Should we abort the rest of the lane with a global error if any violations are found?', optional: true, default_value: true, - is_string: false # https://docs.fastlane.tools/advanced/actions/#boolean-parameters + type: Boolean ), FastlaneCore::ConfigItem.new( key: :allow_retry, @@ -171,7 +171,7 @@ def self.available_options description: 'If any violations are found, show an interactive prompt allowing the user to manually fix the issues locally and retry the linting', optional: true, default_value: false, - is_string: false # https://docs.fastlane.tools/advanced/actions/#boolean-parameters + type: Boolean ), FastlaneCore::ConfigItem.new( key: :check_duplicate_keys, @@ -179,7 +179,7 @@ def self.available_options description: 'Checks the input files for duplicate keys', optional: true, default_value: true, - is_string: false # https://docs.fastlane.tools/advanced/actions/#boolean-parameters + type: Boolean ), ] end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb index 227f6a412..ec441241b 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb @@ -42,7 +42,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :po_file_path, env_name: 'FL_IOS_UPDATE_METADATA_SOURCE_PO_FILE_PATH', description: 'The path of the .po file to update', - is_string: true, + type: String, verify_block: proc do |value| UI.user_error!("No .po file path for UpdateMetadataSourceAction given, pass using `po_file_path: 'file path'`") unless value && (!value.empty?) UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value) @@ -56,7 +56,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :source_files, env_name: 'FL_IOS_UPDATE_METADATA_SOURCE_SOURCE_FILES', description: 'The hash with the path to the source files and the key to use to include their content', - is_string: false, + type: Hash, verify_block: proc do |value| UI.user_error!("No source file hash for UpdateMetadataSourceAction given, pass using `source_files: 'source file hash'`") unless value && (!value.empty?) end), diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb index dd093873e..eb66a3c93 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb @@ -34,11 +34,11 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :new_version, env_name: 'FL_IOS_UPDATE_RELEASE_NOTES_VERSION', description: 'The version we are currently freezing; An empty entry for the _next_ version after this one will be added to the release notes', - is_string: true), + type: String), FastlaneCore::ConfigItem.new(key: :release_notes_file_path, env_name: 'FL_IOS_UPDATE_RELEASE_NOTES_FILE_PATH', description: 'The path to the release notes file to be updated', - is_string: true, + type: String, default_value: File.join(ENV['PROJECT_ROOT_FOLDER'] || '.', 'RELEASE-NOTES.txt')), ] end