-
Notifications
You must be signed in to change notification settings - Fork 105
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
Allow custom ordering of script phases (#204) #210
Conversation
Extended the script phase configuration to include a new form that accepts a key index. The value is then used as index for inserting the phase into the project.
target.build_phases.delete(build_phase) | ||
|
||
# Sanitize values so that no exception come about | ||
if index >= target.build_phases.length or index < -1 |
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.
Use ||
instead of or
.
puts "Adding shell script build phase '#{value}'" | ||
add_shell_script_build_phase(file_manager.template_contents(key), value) | ||
|
||
# -1 means last as index |
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.
Instead of adding this comment, maybe make a constant to hold the value: LAST_INDEX = -1
Neato. I think that we should change the format over entirely. I always felt a little weird about abusing dictionaries like we were doing anyway. This way, you could just have an optional After those fixes, could you remove the code comments? I don't think they are needed. |
yeah, I did backwards compatible because I didn't think I was in a place to On Wed, Feb 4, 2015, 14:35 Gordon Fontenot notifications@github.com wrote:
|
I appreciate that. Thanks. I think we can break backwards compatibility a bit for the sake of flexibility and maintainability. |
@@ -1,5 +1,7 @@ | |||
module Liftoff | |||
class XcodeprojHelper | |||
|
|||
LAST_INDEX = -1 |
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.
Remove the whitespace line above this and add a whitespace line after it.
One tiny style comment (that I can fix if you'd like) then this is ready to go. |
Awesome. Thanks so much for this. Squashed it down and reworded the man page a bit, but this got merged in 98814ec |
👍 |
Extended the script phase configuration to include a new form that
accepts a key index. The value is then used as index for inserting the
phase into the project.