Sha256: 29988c3742f5faedc4fa747af1da669cc0937b22e1ceabf8c8eadd0c3e12cd7e

Contents?: true

Size: 1.06 KB

Versions: 656

Compression:

Stored size: 1.06 KB

Contents

require 'spaceship'

require_relative 'module'

module Sigh
  class Repair
    def repair_all
      UI.message("Starting login with user '#{Sigh.config[:username]}'")
      Spaceship.login(Sigh.config[:username], nil)
      Spaceship.select_team
      UI.message("Successfully logged in")

      # Select all 'Invalid' or 'Expired' provisioning profiles
      broken_profiles = Spaceship.provisioning_profile.all.find_all do |profile|
        (profile.status == "Invalid" or profile.status == "Expired")
      end

      if broken_profiles.count == 0
        UI.success("All provisioning profiles are valid, nothing to do")
        return
      end

      UI.success("Going to repair #{broken_profiles.count} provisioning profiles")

      # Iterate over all broken profiles and repair them
      broken_profiles.each do |profile|
        UI.message("Repairing profile '#{profile.name}'...")
        profile.repair! # yes, that's all you need to repair a profile
      end

      UI.success("Successfully repaired #{broken_profiles.count} provisioning profiles")
    end
  end
end

Version data entries

656 entries across 656 versions & 5 rubygems

Version Path
fastlane-2.225.0 sigh/lib/sigh/repair.rb
fastlane-2.224.0 sigh/lib/sigh/repair.rb
fastlane-2.223.1 sigh/lib/sigh/repair.rb
fastlane-2.223.0 sigh/lib/sigh/repair.rb
fastlane-2.222.0 sigh/lib/sigh/repair.rb
fastlane-2.221.1 sigh/lib/sigh/repair.rb
fastlane-2.221.0 sigh/lib/sigh/repair.rb
fastlane-2.220.0 sigh/lib/sigh/repair.rb
fastlane-2.219.0 sigh/lib/sigh/repair.rb
fastlane-2.218.0 sigh/lib/sigh/repair.rb
fastlane-security-patched-2.216.0 sigh/lib/sigh/repair.rb
fastlane-2.217.0 sigh/lib/sigh/repair.rb
fastlane-2.216.0 sigh/lib/sigh/repair.rb
fastlane-2.215.1 sigh/lib/sigh/repair.rb
fastlane-2.215.0 sigh/lib/sigh/repair.rb
fastlane-mercafacil-2.214.0 sigh/lib/sigh/repair.rb
fastlane-2.214.0 sigh/lib/sigh/repair.rb
fastlane-2.213.0 sigh/lib/sigh/repair.rb
fastlane-2.212.2 sigh/lib/sigh/repair.rb
fastlane_pricing_fix-2.212.1 sigh/lib/sigh/repair.rb