-
Notifications
You must be signed in to change notification settings - Fork 810
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
Add support for scheme pre-actions and post-actions #231
Conversation
@yonaskolb To build XcodeGen with the latest HEAD of xcproj, I had to make the changes in 1fe2e96. Feel free to cherrypick it into #227. |
@kastiglione, #227 is merged |
Do you want to add pre and post actions to |
I don't need that functionality for my work. Do you think it will be common enough for people to have a script they want executed before/after every build, run, test, profile, and archive? I don't know the answer to this, but I can check, are these scripts called with arguments or environment variables that indicate which action (build/run/test/etc) is being invoked? If not, then I would say not to add it. |
I just checked, the pre/post action scripts don't have any arguments or environment variables that tell which type of action (build/run/test/etc) triggered the script. |
Thanks for the review and approval. I plan to do the changes mentioned in the todo checklist. That can be here or a follow up. |
They can be done here 👍 |
89f3ce7
to
7f81b21
Compare
Ready to merge, pending review of updates. |
Looks great @kastiglione, thanks! |
Tests added. |
Nice! Just the updated test project needs to be committed after running the tests. (The tests won't fail automatically with scheme changes at the moment due to #202) |
@@ -59,5 +59,15 @@ func fixtureTests() { | |||
try expect(variableGroup.children.filter { $0 == refs.first?.reference }.count) == 1 | |||
} | |||
} | |||
|
|||
$0.it("generates scheme execution actions") { |
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.
As a note for the future, tests here aren't strictly required as the tests will fail if the generated project changes. Someone just added some more explicit checks afterwards above once. No harm in having this here though 👍
I'll do it in master 👍 |
Add support for scheme pre-actions and post-actions
This pull request adds
preActions
andpostActions
to each of thescheme
action types. For example:✅ Check List ✅
environmentBuildable
)script
needs to be escapedThis change requires tuist/XcodeProj#217.