Sha256: bd33d93c767a8ff7ff1ec8461c1b3837e5bc8daad901532d775abfa730dff88e

Contents?: true

Size: 1 KB

Versions: 476

Compression:

Stored size: 1 KB

Contents

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

476 entries across 476 versions & 2 rubygems

Version Path
fastlane-2.65.0.beta.20171107010003 sigh/lib/sigh/repair.rb
fastlane-2.64.0 sigh/lib/sigh/repair.rb
fastlane-2.64.0.beta.20171106010003 sigh/lib/sigh/repair.rb
fastlane-2.64.0.beta.20171105010003 sigh/lib/sigh/repair.rb
fastlane-2.64.0.beta.20171104010004 sigh/lib/sigh/repair.rb
fastlane-2.64.0.beta.20171103010004 sigh/lib/sigh/repair.rb
fastlane-2.64.0.beta.20171102010003 sigh/lib/sigh/repair.rb
fastlane-2.64.0.beta.20171101010004 sigh/lib/sigh/repair.rb
fastlane-2.63.0 sigh/lib/sigh/repair.rb
fastlane-2.63.0.beta.20171031010003 sigh/lib/sigh/repair.rb
fastlane-2.63.0.beta.20171030010003 sigh/lib/sigh/repair.rb
fastlane-2.63.0.beta.20171029010003 sigh/lib/sigh/repair.rb
fastlane-2.63.0.beta.20171028010003 sigh/lib/sigh/repair.rb
fastlane-2.63.0.beta.20171027010003 sigh/lib/sigh/repair.rb
fastlane-2.63.0.beta.20171026010003 sigh/lib/sigh/repair.rb
fastlane-2.63.0.beta.20171025010003 sigh/lib/sigh/repair.rb
fastlane-2.63.0.beta.20171024010003 sigh/lib/sigh/repair.rb
fastlane-2.62.1 sigh/lib/sigh/repair.rb
fastlane-2.63.0.beta.20171023010003 sigh/lib/sigh/repair.rb
fastlane-2.63.0.beta.20171022010003 sigh/lib/sigh/repair.rb