This repository has been archived by the owner on Nov 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/krausefx/sigh
- Loading branch information
Showing
7 changed files
with
73 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
module Sigh | ||
class Repair | ||
def repair_all | ||
Helper.log.info "Starting login with user '#{Sigh.config[:username]}'" | ||
UI.message "Starting login with user '#{Sigh.config[:username]}'" | ||
Spaceship.login(Sigh.config[:username], nil) | ||
Spaceship.select_team | ||
Helper.log.info "Successfully logged in" | ||
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 | ||
Helper.log.info "All provisioning profiles are valid, nothing to do".green | ||
UI.success "All provisioning profiles are valid, nothing to do" | ||
return | ||
end | ||
|
||
Helper.log.info "Going to repair #{broken_profiles.count} provisioning profiles".green | ||
UI.success "Going to repair #{broken_profiles.count} provisioning profiles" | ||
|
||
# Iterate over all broken profiles and repair them | ||
broken_profiles.each do |profile| | ||
Helper.log.info "Repairing profile '#{profile.name}'..." | ||
UI.message "Repairing profile '#{profile.name}'..." | ||
profile.repair! # yes, that's all you need to repair a profile | ||
end | ||
|
||
Helper.log.info "Successfully repaired #{broken_profiles.count} provisioning profiles".green | ||
UI.success "Successfully repaired #{broken_profiles.count} provisioning profiles" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters