-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[match] nuke now supports filtering by specific certificates #19584
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks awesome... 👏 🚀
match/lib/match/nuke.rb
Outdated
# Force will continue to revoke and delete all certificates and profiles | ||
return if self.params[:force] | ||
return if self.certs.count < 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think, we should early return if this func will be running on CI, because users cant input/select specific certificates on CI? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point 👍.
Would return unless UI.interactive?
do the job?
If it does, other possibility would be check if we're in interactive mode in run
prepare_list
filter_by_cert if UI.interactive?
print_tables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀🚀🚀
match/lib/match/nuke.rb
Outdated
# Force will continue to revoke and delete all certificates and profiles | ||
return if self.params[:force] | ||
return if self.certs.count < 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point 👍.
Would return unless UI.interactive?
do the job?
If it does, other possibility would be check if we're in interactive mode in run
prepare_list
filter_by_cert if UI.interactive?
print_tables
match/lib/match/nuke.rb
Outdated
})) | ||
puts("") | ||
|
||
if UI.confirm("Do you want to nuke specific certificates and their associated profiles?") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to add an explanation that Declining will nuke all the listed certificates and their associated profiles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this idea!
Also, @lucgrabowski... Do you mind sending me an email over at me AT joshholtz DOT com? 😇 Tried looking for contact info for you on your GitHub profile but couldn't find any 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @joshdholtz, sure, I'll send you an email.
6b1e68a
to
64859fe
Compare
Hey @joshdholtz 👋 Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉 Please let us know if this change requires an immediate release by adding a comment here 👍 |
Congratulations! 🎉 This was released as part of fastlane 2.198.0 🚀 |
Motivation and Context
Match's nuke has always nuke all certificate and provisioning profiles without giving an option to nuke only a subset with filtering. This behavior worked out great unless you had a lot of certificates and profiles that were good and there were only a few that were bad or expired that you wanted to revoke and delete.
This new behavior allows optional filtering by one to many certificates which will filter the only to those specified certificates and the profiles that use them.
Description
filter_by_cert
method afterprepare_list
and beforeprint_tables
that offers user the option to filter by certificate:force
is set totrue
Testing Steps
Update
Gemfile
and runbundle install
,bundle update fastlane
, orbundle update