require "bundler/gem_tasks" GEMS = %w(fastlane danger-device_grid) SECONDS_PER_DAY = 60 * 60 * 24 task(:rubygems_admins) do names = ["KrauseFx", "joshdholtz", "snatchev", "powerivq"] (GEMS + ["krausefx-shenzhen", "commander-fastlane", "fastlane-plugin-firebase_test_lab"]).each do |gem_name| names.each do |name| puts(`gem owner #{gem_name} -a #{name}`) end end end task(:test_all) do formatter = "--format progress" formatter += " -r rspec_junit_formatter --format RspecJunitFormatter -o #{ENV['CIRCLE_TEST_REPORTS']}/rspec/fastlane-junit-results.xml" if ENV["CIRCLE_TEST_REPORTS"] command = "rspec --pattern ./**/*_spec.rb #{formatter}" # To move Ruby 3.0 or next major version migration going forward, we want to keep monitoring deprecation warnings if Gem.win_platform? # Windows would not work with /bin/bash so skip collecting warnings sh(command) else # Mix stderr into stdout to let handle `tee` it and then collect warnings by filtering stdout out command += " 2>&1 | tee >(grep 'warning:' > #{File.join(ENV['CIRCLE_TEST_REPORTS'], 'ruby_warnings.txt')})" if ENV["CIRCLE_TEST_REPORTS"] # tee >(...) occurs syntax error with `sh` helper which uses /bin/sh by default. sh("/bin/bash -o pipefail -c \"#{command}\"") end end # Overwrite the default rake task # since we use fastlane to deploy fastlane task(:push) do sh("bundle exec fastlane release") end task(:generate_team_table) do require 'json' content = ["
"
content << ""
content << "![]() #{github_user_name}" else content << "#{github_user_name}" end # content << "#{user_content['slogan']} " if user_content['slogan'].to_s.length > 0 content << " | "
content << "