Sha256: 29988c3742f5faedc4fa747af1da669cc0937b22e1ceabf8c8eadd0c3e12cd7e

Contents?: true

Size: 1.06 KB

Versions: 657

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

657 entries across 657 versions & 5 rubygems

Version Path
fastlane-2.132.0.beta.20190920200012 sigh/lib/sigh/repair.rb
fastlane-2.132.0.beta.20190919200100 sigh/lib/sigh/repair.rb
fastlane-2.132.0.beta.20190918200023 sigh/lib/sigh/repair.rb
fastlane-2.132.0.beta.20190917200011 sigh/lib/sigh/repair.rb
fastlane-2.132.0.beta.20190916200055 sigh/lib/sigh/repair.rb
fastlane-2.132.0.beta.20190915200038 sigh/lib/sigh/repair.rb
fastlane-2.132.0.beta.20190914200034 sigh/lib/sigh/repair.rb
fastlane-2.132.0.beta.20190913200058 sigh/lib/sigh/repair.rb
fastlane-2.132.0.beta.20190912200052 sigh/lib/sigh/repair.rb
fastlane-2.131.0 sigh/lib/sigh/repair.rb
fastlane-2.131.0.beta.20190911200010 sigh/lib/sigh/repair.rb
fastlane-2.131.0.beta.20190910200104 sigh/lib/sigh/repair.rb
fastlane-2.131.0.beta.20190909200058 sigh/lib/sigh/repair.rb
fastlane-2.131.0.beta.20190908200041 sigh/lib/sigh/repair.rb
fastlane-2.131.0.beta.20190907200030 sigh/lib/sigh/repair.rb
fastlane-2.131.0.beta.20190906200026 sigh/lib/sigh/repair.rb
fastlane-2.131.0.beta.20190905200113 sigh/lib/sigh/repair.rb
fastlane-2.131.0.beta.20190904200040 sigh/lib/sigh/repair.rb
fastlane-2.131.0.beta.20190903200013 sigh/lib/sigh/repair.rb
fastlane-2.131.0.beta.20190902200022 sigh/lib/sigh/repair.rb