diff --git a/.ci/bundler_version.rb b/.ci/bundler_version.rb deleted file mode 100644 index 77dc06642..000000000 --- a/.ci/bundler_version.rb +++ /dev/null @@ -1,5 +0,0 @@ -# /usr/bin/env ruby -file = File.join(__dir__, "..", "Gemfile.lock") -lines = File.read(file).split("\n") -idx = lines.index { |l| l == "BUNDLED WITH" } -puts lines[idx + 1].strip diff --git a/.circleci/config.yml b/.circleci/config.yml index 178238e3a..9c8a9f95e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,29 +1,30 @@ -version: 2.0 +version: 2.1 +orbs: + ruby: circleci/ruby@2.5.4 + python: circleci/python@3.3.0 jobs: "Test": docker: - - image: fastlanetools/ci:0.4.0 + - image: fastlanetoolsci/fastlane:1.0.1 working_directory: ~/code steps: - checkout - - run: sudo pip3 install pipenv - - run: pipenv install - - run: gem install bundler -v $(ruby .ci/bundler_version.rb) - - run: bundle update + - python/install-packages: + pkg-manager: pipenv + - ruby/install-deps - run: pipenv run bundle exec fastlane test - run: bundle exec rubocop - run: bundle exec danger || echo "danger failed, moving on" "Deploy": docker: - - image: fastlanetools/ci:0.4.0 + - image: ibotpeaches/fastlaneci-test:latest working_directory: ~/code steps: - checkout - - run: sudo pip3 install pipenv - - run: pipenv install - - run: gem install bundler -v $(ruby .ci/bundler_version.rb) - - run: bundle update + - python/install-packages: + pkg-manager: pipenv + - ruby/install-deps - run: pipenv run ./scripts/ci/deploy.sh workflows: diff --git a/.gitignore b/.gitignore index 9e07ca9fd..1e6f9b23b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +.idea site/ /fastlane/report.xml .keys diff --git a/.rubocop.yml b/.rubocop.yml index d4b833517..7c6cc3dab 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,6 @@ +plugins: + - rubocop-performance + Style/MultipleComparison: Enabled: false @@ -38,16 +41,18 @@ Metrics/ModuleLength: Enabled: false # certificate_1 is an okay variable name -Style/VariableNumber: +Naming/VariableNumber: Enabled: false # This is used a lot across the fastlane code base for config files -Style/MethodMissing: +Lint/MissingSuper: + Enabled: false +Style/MissingRespondToMissing: Enabled: false # This rule isn't useful, lots of discussion happening around it also # e.g. https://github.com/bbatsov/rubocop/issues/2338 -MultilineBlockChain: +Style/MultilineBlockChain: Enabled: false # @@ -74,34 +79,16 @@ Style/TernaryParentheses: Style/EmptyMethod: Enabled: false -# It's better to be more explicit about the type -Style/BracesAroundHashParameters: - Enabled: false - # specs sometimes have useless assignments, which is fine Lint/UselessAssignment: Exclude: - '**/spec/**/*' -# In specs requires are done automatically -Require/MissingRequireStatement: - Exclude: - - '**/spec/**/*.rb' - - '**/spec_helper.rb' - - 'spaceship/lib/spaceship/babosa_fix.rb' - - '**/Fastfile' - - '**/*.gemspec' - - 'rakelib/**/*' - - '**/*.rake' - - '**/Rakefile' - - 'fastlane/**/*' # TODO: remove - - 'supply/**/*' # TODO: remove - # We could potentially enable the 2 below: -Layout/IndentHash: +Layout/FirstHashElementIndentation: Enabled: false -Layout/AlignHash: +Layout/HashAlignment: Enabled: false # HoundCI doesn't like this rule @@ -117,7 +104,7 @@ Style/SymbolArray: Enabled: false # We still support Ruby 2.0.0 -Layout/IndentHeredoc: +Layout/HeredocIndentation: Enabled: false # This cop would not work fine with rspec @@ -126,7 +113,7 @@ Style/MixinGrouping: - '**/spec/**/*' # Sometimes we allow a rescue block that doesn't contain code -Lint/HandleExceptions: +Lint/SuppressedException: Enabled: false # Cop supports --auto-correct. @@ -184,7 +171,7 @@ Metrics/ClassLength: # Configuration parameters: AllowURI, URISchemes. -Metrics/LineLength: +Layout/LineLength: Max: 370 # Configuration parameters: CountKeywordArgs. @@ -224,7 +211,7 @@ Lint/ParenthesesAsGroupedExpression: # This would reject is_ in front of methods # We use `is_supported?` everywhere already -Style/PredicateName: +Naming/PredicatePrefix: Enabled: false # We allow the $ @@ -237,7 +224,8 @@ Layout/SpaceAroundOperators: - '**/spec/actions_specs/xcodebuild_spec.rb' AllCops: - TargetRubyVersion: 2.0 + NewCops: enable + TargetRubyVersion: 3.0 Include: - '*/lib/assets/*Template' - '*/lib/assets/*TemplateAndroid' @@ -247,7 +235,7 @@ AllCops: - '**/lib/assets/DefaultFastfileTemplate' # They have not to be snake_case -Style/FileName: +Naming/FileName: Exclude: - '**/Dangerfile' - '**/Brewfile' @@ -279,15 +267,10 @@ Style/IfInsideElse: Style/CollectionMethods: Enabled: false -# Check whether fork is handled correctly on all platforms -CrossPlatform/ForkUsage: - Exclude: - - '**/plugins/template/**/*' - # ( ) for method calls Style/MethodCallWithArgsParentheses: Enabled: true - IgnoredMethods: + AllowedMethods: - 'require' - 'require_relative' - 'fastlane_require' diff --git a/Gemfile b/Gemfile index 11df1c0d4..2cd5274c4 100644 --- a/Gemfile +++ b/Gemfile @@ -2,5 +2,6 @@ source("https://rubygems.org") gem "danger", "~> 8" # Fixed on 8.x because 9.x uses Octokit 5.x which doesn't support Ruby 2.6, which is needed to run verify_docs lane in fastlane's main repo. gem "fastlane", git: "https://github.com/fastlane/fastlane" -gem "rubocop", "0.49.1" +gem "rubocop" +gem "rubocop-performance" gem "xcov" # Needed for testing sample code diff --git a/Gemfile.lock b/Gemfile.lock index 9ce498efd..f755e411b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,16 +1,17 @@ GIT remote: https://github.com/fastlane/fastlane - revision: 512a047abd596a5c2c0e0156e9f52e111552a727 + revision: 5835bddc2a0691902b5470fe9b577b87b15f38a7 specs: - fastlane (2.230.0) + fastlane (2.232.2) CFPropertyList (>= 2.3, < 4.0.0) abbrev (~> 0.1.2) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) - aws-sdk-s3 (~> 1.0) + aws-sdk-s3 (~> 1.197) babosa (>= 1.0.3, < 2.0.0) base64 (~> 0.2.0) - bundler (>= 1.12.0, < 3.0.0) + benchmark (>= 0.1.0) + bundler (>= 1.17.3, < 5.0.0) colored (~> 1.2) commander (~> 4.6) csv (~> 3.3) @@ -25,7 +26,7 @@ GIT gh_inspector (>= 1.1.2, < 2.0.0) google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) - google-cloud-env (>= 1.6.0, < 2.0.0) + google-cloud-env (>= 1.6.0, <= 2.1.1) google-cloud-storage (~> 1.31) highline (~> 2.0) http-cookie (~> 1.0.5) @@ -38,6 +39,7 @@ GIT naturally (~> 2.2) nkf (~> 0.2.0) optparse (>= 0.1.1, < 1.0.0) + ostruct (>= 0.1.0) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) security (= 0.1.5) @@ -56,14 +58,14 @@ GEM specs: CFPropertyList (3.0.8) abbrev (0.1.2) - addressable (2.8.8) + addressable (2.8.9) public_suffix (>= 2.0.2, < 8.0) artifactory (3.0.17) ast (2.4.3) atomos (0.1.3) aws-eventstream (1.4.0) - aws-partitions (1.1196.0) - aws-sdk-core (3.240.0) + aws-partitions (1.1229.0) + aws-sdk-core (3.244.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) @@ -71,17 +73,18 @@ GEM bigdecimal jmespath (~> 1, >= 1.6.1) logger - aws-sdk-kms (1.118.0) - aws-sdk-core (~> 3, >= 3.239.1) + aws-sdk-kms (1.123.0) + aws-sdk-core (~> 3, >= 3.244.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.208.0) - aws-sdk-core (~> 3, >= 3.234.0) + aws-sdk-s3 (1.217.0) + aws-sdk-core (~> 3, >= 3.244.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) aws-sigv4 (1.12.1) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) base64 (0.2.0) + benchmark (0.5.0) bigdecimal (4.0.1) claide (1.1.0) claide-plugins (0.9.2) @@ -115,7 +118,7 @@ GEM dotenv (2.8.1) emoji_regex (3.2.3) excon (0.112.0) - faraday (1.10.4) + faraday (1.10.5) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -133,57 +136,59 @@ GEM faraday-em_http (1.0.0) faraday-em_synchrony (1.0.1) faraday-excon (1.1.0) - faraday-http-cache (2.5.1) + faraday-http-cache (2.6.1) faraday (>= 0.8) faraday-httpclient (1.0.1) - faraday-multipart (1.1.1) + faraday-multipart (1.2.0) multipart-post (~> 2.0) faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) - faraday-retry (1.0.3) + faraday-retry (1.0.4) faraday_middleware (1.2.1) faraday (~> 1.0) - fastimage (2.4.0) + fastimage (2.4.1) fastlane-sirp (1.0.0) sysrandom (~> 1.0) gh_inspector (1.1.3) git (1.19.1) addressable (~> 2.8) rchardet (~> 1.8) - google-apis-androidpublisher_v3 (0.54.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-core (0.11.3) + google-apis-androidpublisher_v3 (0.98.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-core (0.18.0) addressable (~> 2.5, >= 2.5.1) - googleauth (>= 0.16.2, < 2.a) - httpclient (>= 2.8.1, < 3.a) + googleauth (~> 1.9) + httpclient (>= 2.8.3, < 3.a) mini_mime (~> 1.0) + mutex_m representable (~> 3.0) retriable (>= 2.0, < 4.a) - rexml - google-apis-iamcredentials_v1 (0.17.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-playcustomapp_v1 (0.13.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.31.0) - google-apis-core (>= 0.11.0, < 2.a) + google-apis-iamcredentials_v1 (0.26.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-playcustomapp_v1 (0.17.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-storage_v1 (0.61.0) + google-apis-core (>= 0.15.0, < 2.a) google-cloud-core (1.8.0) google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) - google-cloud-env (1.6.0) - faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.5.0) - google-cloud-storage (1.47.0) + google-cloud-env (2.1.1) + faraday (>= 1.0, < 3.a) + google-cloud-errors (1.6.0) + google-cloud-storage (1.58.0) addressable (~> 2.8) digest-crc (~> 0.4) - google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.31.0) + google-apis-core (>= 0.18, < 2) + google-apis-iamcredentials_v1 (~> 0.18) + google-apis-storage_v1 (>= 0.42) google-cloud-core (~> 1.6) - googleauth (>= 0.16.2, < 2.a) + googleauth (~> 1.9) mini_mime (~> 1.0) - googleauth (1.8.1) - faraday (>= 0.17.3, < 3.a) + googleauth (1.11.2) + faraday (>= 1.0, < 3.a) + google-cloud-env (~> 2.1) jwt (>= 1.4, < 3.0) multi_json (~> 1.11) os (>= 0.9, < 2.0) @@ -194,17 +199,19 @@ GEM httpclient (2.9.0) mutex_m jmespath (1.6.2) - json (2.18.0) + json (2.19.2) jwt (2.10.2) base64 - kramdown (2.5.1) - rexml (>= 3.3.9) + kramdown (2.5.2) + rexml (>= 3.4.4) kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) logger (1.7.0) mini_magick (4.13.2) mini_mime (1.1.5) - multi_json (1.18.0) + multi_json (1.19.1) multipart-post (2.4.1) mutex_m (0.3.0) nanaimo (0.4.0) @@ -218,34 +225,48 @@ GEM open4 (1.3.4) optparse (0.8.1) os (1.1.4) + ostruct (0.6.3) parallel (1.27.0) - parser (2.7.2.0) + parser (3.3.10.2) ast (~> 2.4.1) + racc plist (3.7.2) - powerpack (0.1.3) - public_suffix (7.0.0) - rainbow (2.2.2) - rake + prism (1.9.0) + public_suffix (7.0.5) + racc (1.8.1) + rainbow (3.1.1) rake (13.3.1) rchardet (1.10.0) + regexp_parser (2.11.3) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) - retriable (3.1.2) + retriable (3.4.1) rexml (3.4.4) rouge (3.28.0) - rubocop (0.49.1) + rubocop (1.86.0) + json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) - parser (>= 2.3.3.1, < 3.0) - powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.49.1) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-performance (1.26.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) rubyzip (2.4.1) - sawyer (0.9.2) + sawyer (0.9.3) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) security (0.1.5) @@ -268,7 +289,7 @@ GEM tty-spinner (0.9.3) tty-cursor (~> 0.7) uber (0.1.0) - unicode-display_width (1.8.0) + unicode-display_width (2.6.0) word_wrap (1.0.0) xcodeproj (1.27.0) CFPropertyList (>= 2.3.3, < 4.0) @@ -277,9 +298,11 @@ GEM colored2 (~> 3.1) nanaimo (~> 0.4.0) rexml (>= 3.3.6, < 4.0) - xcov (1.8.1) + xcov (1.9.0) + abbrev fastlane (>= 2.141.0, < 3.0.0) multipart-post + nkf slack-notifier terminal-table xcodeproj @@ -288,18 +311,17 @@ GEM rouge (~> 3.28.0) xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) - xcresult (0.2.2) + xcresult (0.2.5) PLATFORMS - -darwin-22 - arm64-darwin-24 - x86_64-linux + x86_64-linux-gnu DEPENDENCIES danger (~> 8) fastlane! - rubocop (= 0.49.1) + rubocop + rubocop-performance xcov BUNDLED WITH - 2.4.22 + 2.6.7