diff --git a/.buildkite/gem-push.sh b/.buildkite/commands/gem-push.sh similarity index 100% rename from .buildkite/gem-push.sh rename to .buildkite/commands/gem-push.sh diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 45c919611..f7d9d6642 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -13,13 +13,6 @@ common_params: propagate-environment: true environment: - "RUBYGEMS_API_KEY" - - &docker_plugin_with_danger_token - docker#v5.8.0: - image: *ruby_version - propagate-environment: true - environment: - - "DANGER_GITHUB_API_TOKEN" - steps: ################# @@ -55,32 +48,6 @@ steps: ruby: - 3.2.2 - ################# - # Lint - ################# - - label: "🧹 Lint (Rubocop)" - key: rubocop - command: | - bundle install - echo "--- :rubocop: Run Rubocop" - bundle exec rubocop - plugins: [*docker_plugin] - agents: - queue: "default" - - ################# - # Danger - ################# - - label: "⛔️ Danger" - key: danger - command: | - bundle install - echo "--- :rubocop: Run Danger" - bundle exec danger - plugins: [*docker_plugin_with_danger_token] - agents: - queue: "default" - ################# # Push to RubyGems ################# @@ -89,12 +56,10 @@ steps: if: build.tag != null depends_on: - test - - rubocop - - danger # Note: We intentionally call a separate `.sh` script here (as opposed to having all the # commands written inline) to avoid leaking a key used in the process in clear in the # BUILDKITE_COMMAND environment variable. - command: .buildkite/gem-push.sh + command: .buildkite/commands/gem-push.sh plugins: [*docker_plugin] agents: queue: "default" diff --git a/.github/workflows/run-danger.yml b/.github/workflows/run-danger.yml new file mode 100644 index 000000000..85d1675d0 --- /dev/null +++ b/.github/workflows/run-danger.yml @@ -0,0 +1,13 @@ +name: ☢️ Danger + +on: + pull_request: + types: [opened, reopened, ready_for_review, synchronize, edited, review_requested, review_request_removed, labeled, unlabeled, milestoned, demilestoned] + +jobs: + dangermattic: + # runs on draft PRs only for opened / synchronize events + if: ${{ (github.event.pull_request.draft == false) || (github.event.pull_request.draft == true && contains(fromJSON('["opened", "synchronize"]'), github.event.action)) }} + uses: Automattic/dangermattic/.github/workflows/reusable-run-danger.yml@v1.0.0 + secrets: + github-token: ${{ secrets.DANGERMATTIC_GITHUB_TOKEN }} diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2a6baa19c..4f2be7855 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-09-21 15:44:18 UTC using RuboCop version 1.56.3. +# on 2024-02-07 17:44:01 UTC using RuboCop version 1.60.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -14,24 +14,16 @@ Gemspec/DevelopmentDependencies: Exclude: - 'fastlane-plugin-wpmreleasetoolkit.gemspec' -# Offense count: 1 -# Configuration parameters: Severity, Include. -# Include: **/*.gemspec -Gemspec/RequiredRubyVersion: - Exclude: - - 'fastlane-plugin-wpmreleasetoolkit.gemspec' - # Offense count: 3 Lint/NonLocalExitFromIterator: Exclude: - 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb' - 'lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb' -# Offense count: 7 +# Offense count: 4 Naming/AccessorMethodName: Exclude: - 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_update_action.rb' - - 'lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb' - 'lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb' # Offense count: 2 @@ -42,7 +34,7 @@ Naming/MethodParameterName: - 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb' - 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb' -# Offense count: 108 +# Offense count: 110 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros. # NamePrefix: is_, has_, have_ # ForbiddenPrefixes: is_, has_, have_ @@ -68,7 +60,7 @@ RSpec/ContextWording: - 'spec/git_helper_spec.rb' - 'spec/ios_lint_localizations_spec.rb' -# Offense count: 45 +# Offense count: 62 # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. # Include: **/*_spec*rb*, **/spec/**/* RSpec/FilePath: @@ -81,7 +73,7 @@ RSpec/InstanceVariable: - 'spec/git_helper_spec.rb' - 'spec/ios_lint_localizations_spec.rb' -# Offense count: 109 +# Offense count: 122 # Configuration parameters: . # SupportedStyles: have_received, receive RSpec/MessageSpies: @@ -96,7 +88,7 @@ RSpec/NamedSubject: - 'spec/configuration_spec.rb' - 'spec/file_reference_spec.rb' -# Offense count: 10 +# Offense count: 14 RSpec/NestedGroups: Max: 5 @@ -124,7 +116,7 @@ Security/Open: - 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb' - 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb' -# Offense count: 123 +# Offense count: 124 # Configuration parameters: AllowedConstants. Style/Documentation: Enabled: false diff --git a/Dangerfile b/Dangerfile index e1c346be0..ec646a641 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + def version lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) @@ -10,16 +12,26 @@ def gemfile_lock_version gemfile_lock.scan(/fastlane-plugin-wpmreleasetoolkit \((\d+.\d+.\d+)\)/).last.first end -# Before checking the version, get rid of any change that `bundle install` -# might have done. -`git checkout Gemfile.lock &> /dev/null` +github.dismiss_out_of_range_messages + +# `files: []` forces rubocop to scan all files, not just the ones modified in the PR +rubocop.lint(files: [], force_exclusion: true, inline_comment: true, fail_on_inline_comment: true, include_cop_names: true) + +manifest_pr_checker.check_gemfile_lock_updated + +# skip remaining checks if we're in a release-process PR +if github.pr_labels.include?('Releases') + message('This PR has the `Releases` label: some checks will be skipped.') + return +end if version.to_s != gemfile_lock_version.to_s - message = %{ -The version in the `Gemfile.lock` (`#{gemfile_lock_version}`) doesn't match the one in `version.rb` (`#{version}`). + message = <<~MESSAGE + The version in the `Gemfile.lock` (`#{gemfile_lock_version}`) doesn't match the one in `version.rb` (`#{version}`). + + Please run `bundle install` to make sure they match. + MESSAGE -Please run `bundle install` to make sure they match. -} failure(message) end @@ -30,11 +42,20 @@ unless git.modified_files.include?('CHANGELOG.md') warn 'Please add an entry in the CHANGELOG.md file to describe the changes made by this PR' end -# Lint with Rubocop and report violations inline in GitHub -github.dismiss_out_of_range_messages # This way, fixed violations should go -renaming_map = (git.renamed_files || []).to_h { |e| [e[:before], e[:after]] } # when files are renamed, git.modified_files contains old name, not new one, so we need to do the convertion -rubocop.lint( - files: git.added_files + (git.modified_files.map { |f| renaming_map[f] || f }) - git.deleted_files, - inline_comment: true, - fail_on_inline_comment: true # Make the inline comments failures +pr_size_checker.check_diff_size(max_size: 500) + +# skip remaining checks if the PR is still a Draft +if github.pr_draft? + message('This PR is still a Draft: some checks will be skipped.') + return +end + +labels_checker.check( + do_not_merge_labels: ['Do Not Merge'], + required_labels: [//], + required_labels_error: 'PR requires at least one label.' ) + +milestone_checker.check_milestone_due_date(days_before_due: 5) + +warn("No reviewers have been set for this PR yet. Please request a review from **@\u2060wordpress-mobile/apps-infrastructure**.") unless github_utils.requested_reviewers? diff --git a/Gemfile b/Gemfile index ba277fc93..679bb9223 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,6 @@ gemspec gem 'buildkite-test_collector', '~> 2.3' gem 'codecov', require: false -gem 'danger', '~> 9.3' -gem 'danger-rubocop', '~> 0.6' +gem 'danger-dangermattic', '~> 1.0' gem 'webmock', require: false gem 'yard' diff --git a/Gemfile.lock b/Gemfile.lock index eaa690dfb..858b5a8b0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -24,12 +24,17 @@ GEM specs: CFPropertyList (3.0.6) rexml - activesupport (7.0.4.3) + activesupport (7.1.0) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - addressable (2.8.4) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) @@ -38,25 +43,27 @@ GEM ast (2.4.2) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.752.0) - aws-sdk-core (3.171.0) + aws-partitions (1.834.0) + aws-sdk-core (3.185.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.63.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-kms (1.72.0) + aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.121.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-s3 (1.136.0) + aws-sdk-core (~> 3, >= 3.181.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.4) - aws-sigv4 (1.5.2) + aws-sigv4 (~> 1.6) + aws-sigv4 (1.6.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) + base64 (0.2.0) + bigdecimal (3.1.4) buildkit (1.5.0) sawyer (>= 0.6) - buildkite-test_collector (2.3.1) + buildkite-test_collector (2.3.2) activesupport (>= 4.2) chroma (0.2.0) claide (1.1.0) @@ -64,10 +71,10 @@ GEM cork nap open4 (~> 1.3) - cocoapods (1.12.1) + cocoapods (1.13.0) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.12.1) + cocoapods-core (= 1.13.0) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.6.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -81,8 +88,8 @@ GEM molinillo (~> 0.8.0) nap (~> 1.0) ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.21.0, < 2.0) - cocoapods-core (1.12.1) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.13.0) activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) @@ -109,11 +116,12 @@ GEM commander (4.6.0) highline (~> 2.0.0) concurrent-ruby (1.2.2) + connection_pool (2.4.1) cork (0.3.0) colored2 (~> 3.1) crack (0.4.5) rexml - danger (9.3.1) + danger (9.4.3) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -124,25 +132,47 @@ GEM kramdown (~> 2.3) kramdown-parser-gfm (~> 1.0) no_proxy_fix - octokit (~> 6.0) + octokit (>= 4.0) terminal-table (>= 1, < 4) - danger-rubocop (0.10.0) + danger-dangermattic (1.0.0) + danger (~> 9.4) + danger-junit (~> 1.0) + danger-plugin-api (~> 1.0) + danger-rubocop (~> 0.12) + danger-swiftlint (~> 0.35) + danger-xcode_summary (~> 1.0) + rubocop (~> 1.60) + danger-junit (1.0.2) + danger (> 2.0) + ox (~> 2.0) + danger-plugin-api (1.0.0) + danger (> 2.0) + danger-rubocop (0.12.0) danger rubocop (~> 1.0) + danger-swiftlint (0.35.0) + danger + rake (> 10) + thor (~> 1.0.0) + danger-xcode_summary (1.2.0) + danger-plugin-api (~> 1.0) + xcresult (~> 0.2) declarative (0.0.20) diff-lcs (1.5.0) diffy (3.4.2) - digest-crc (0.6.4) + digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) docile (1.4.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.8.1) + drb (2.1.1) + ruby2_keywords emoji_regex (3.2.3) escape (0.0.4) ethon (0.16.0) ffi (>= 1.15.0) - excon (0.99.0) + excon (0.104.0) faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -161,7 +191,7 @@ GEM faraday-em_http (1.0.0) faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) - faraday-http-cache (2.5.0) + faraday-http-cache (2.5.1) faraday (>= 0.8) faraday-httpclient (1.0.1) faraday-multipart (1.0.4) @@ -173,8 +203,8 @@ GEM faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) - fastimage (2.2.6) - fastlane (2.213.0) + fastimage (2.2.7) + fastlane (2.216.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -195,6 +225,7 @@ GEM google-apis-playcustomapp_v1 (~> 0.1) google-cloud-storage (~> 1.31) highline (~> 2.0) + http-cookie (~> 1.0.5) json (< 3.0.0) jwt (>= 2.1.0, < 3) mini_magick (>= 4.9.4, < 5.0.0) @@ -206,23 +237,23 @@ GEM security (= 0.1.3) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (>= 1.4.5, < 2.0.0) + terminal-table (~> 3) tty-screen (>= 0.6.3, < 1.0.0) tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) - ffi (1.15.5) + ffi (1.16.3) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - git (1.13.2) + git (1.19.1) addressable (~> 2.8) rchardet (~> 1.8) - google-apis-androidpublisher_v3 (0.39.0) + google-apis-androidpublisher_v3 (0.50.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-core (0.11.0) + google-apis-core (0.11.1) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -251,10 +282,9 @@ GEM google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (1.5.2) + googleauth (1.8.1) faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) - memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) @@ -263,32 +293,33 @@ GEM http-cookie (1.0.5) domain_name (~> 0.5) httpclient (2.8.3) - i18n (1.12.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) java-properties (0.3.0) jmespath (1.6.2) - json (2.6.3) - jwt (2.7.0) + json (2.7.1) + jwt (2.7.1) kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - memoist (0.16.2) + language_server-protocol (3.17.0.3) method_source (0.9.2) mini_magick (4.12.0) - mini_mime (1.1.2) - mini_portile2 (2.8.1) - minitest (5.18.0) + mini_mime (1.1.5) + mini_portile2 (2.8.4) + minitest (5.20.0) molinillo (0.8.0) multi_json (1.15.0) - multipart-post (2.0.0) + multipart-post (2.4.0) + mutex_m (0.1.2) nanaimo (0.3.0) nap (1.1.0) naturally (2.2.1) netrc (0.11.0) no_proxy_fix (0.1.2) - nokogiri (1.14.3) - mini_portile2 (~> 2.8.0) + nokogiri (1.15.4) + mini_portile2 (~> 2.8.2) racc (~> 1.4) octokit (6.1.1) faraday (>= 1, < 3) @@ -297,9 +328,11 @@ GEM options (2.3.2) optparse (0.1.1) os (1.1.4) - parallel (1.23.0) - parser (3.2.2.0) + ox (2.14.17) + parallel (1.24.0) + parser (3.3.0.5) ast (~> 2.4.1) + racc plist (3.7.0) progress_bar (1.3.3) highline (>= 1.6, < 3) @@ -308,19 +341,19 @@ GEM coderay (~> 1.1.0) method_source (~> 0.9.0) public_suffix (4.0.7) - racc (1.6.2) + racc (1.7.3) rainbow (3.1.1) - rake (13.0.6) - rake-compiler (1.2.1) + rake (13.1.0) + rake-compiler (1.2.5) rake rchardet (1.8.0) - regexp_parser (2.8.0) + regexp_parser (2.9.0) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) - rexml (3.2.5) + rexml (3.2.6) rmagick (4.3.0) rouge (2.0.7) rspec (3.12.0) @@ -332,23 +365,24 @@ GEM rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-support (3.12.0) + rspec-support (3.12.1) rspec_junit_formatter (0.4.1) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.50.2) + rubocop (1.60.2) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.28.0) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) rubocop-require_tools (0.1.2) rubocop (>= 0.49.1) @@ -363,7 +397,7 @@ GEM addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) security (0.1.3) - signet (0.17.0) + signet (0.18.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) @@ -377,7 +411,9 @@ GEM simplecov-html (~> 0.10.0) simplecov-html (0.10.2) terminal-notifier (2.0.0) - terminal-table (1.6.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + thor (1.0.1) trailblazer-option (0.1.2) tty-cursor (0.7.1) tty-screen (0.8.1) @@ -391,14 +427,14 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.8.2) - unicode-display_width (2.4.2) - webmock (3.18.1) + unicode-display_width (2.5.0) + webmock (3.19.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) webrick (1.8.1) word_wrap (1.0.0) - xcodeproj (1.22.0) + xcodeproj (1.23.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -409,6 +445,7 @@ GEM rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) + xcresult (0.2.1) yard (0.9.34) PLATFORMS @@ -419,8 +456,7 @@ DEPENDENCIES bundler (~> 2.0) cocoapods (~> 1.10) codecov - danger (~> 9.3) - danger-rubocop (~> 0.6) + danger-dangermattic (~> 1.0) fastlane (~> 2.210) fastlane-plugin-wpmreleasetoolkit! pry (~> 0.12.2) @@ -435,4 +471,4 @@ DEPENDENCIES yard BUNDLED WITH - 2.4.14 + 2.4.20 diff --git a/MIGRATION.md b/MIGRATION.md index 3450db15f..b3e72f6f4 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,11 +1,8 @@ # Migration Instructions for Major Releases -## From `10.0.0` to `11.0.0` - - - The new minimum required Ruby version is `3.2.2`. Please make sure to upgrade your projects before upgrading to this version to avoid compatibility issues. - ## From `9.0.0` to `10.0.0` + - The new minimum required Ruby version is `3.2.2`. Please make sure to upgrade your projects before upgrading to this version to avoid compatibility issues. - Action `addbranchprotection` has been renamed `set_branch_protection`. Besides, you might want to use the new `copy_branch_protection(from_branch: to_branch:)` instead (especially for protecting the `release/*` branch after code-freeze). - Action `removebranchprotection` has been renamed `remove_branch_protection`. diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb index 64c24a2f4..411c8a54a 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb @@ -108,7 +108,7 @@ def self.available_options type: Hash, verify_block: proc do |values| UI.user_error!('`target_original_files` must contain at least one path to an original `.strings` file.') if values.empty? - values.each do |path, _| + values.each_key do |path| UI.user_error!("Path `#{path}` (found in `target_original_files`) does not exist.") unless File.exist?(path) UI.user_error! "Expected `#{path}` (found in `target_original_files`) to be a path ending in a `*.lproj/*.strings`." unless File.extname(path) == '.strings' && File.extname(File.dirname(path)) == '.lproj' end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb index dd891108a..303a60098 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb @@ -31,7 +31,7 @@ def self.run(params) app_thinning_plist_path = params[:app_thinning_plist_path] || File.join(File.dirname(params[:ipa_path]), 'app-thinning.plist') if File.exist?(app_thinning_plist_path) plist = Plist.parse_xml(app_thinning_plist_path) - plist['variants'].each do |_key, variant| + plist['variants'].each_value do |variant| variant_descriptors = variant['variantDescriptors'] || [{ 'device' => 'Universal' }] variant_descriptors.each do |desc| variant_metadata = { device: desc['device'], 'OS Version': desc['os-version'] } 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 d86b2e889..36096f34d 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 @@ -10,7 +10,7 @@ def self.run(params) release_version: params[:release_version]) Action.sh("git add #{params[:po_file_path]}") - params[:source_files].each do |_key, file| + params[:source_files].each_value do |file| Action.sh("git add #{file}") end