Skip to content
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 preActions and postActions to RunAction and ProfileAction #3787

Merged
merged 4 commits into from Dec 9, 2021

Conversation

hisaac
Copy link
Collaborator

@hisaac hisaac commented Dec 5, 2021

This PR was generated from a question in the Tuist Slack here: https://tuistapp.slack.com/archives/CTB0DBVD2/p1638098676119800

Short description πŸ“

In one of my projects, I use a custom pre-action on one of my scheme's Run action. When attempting to migrate said project to Tuist, I noticed that Tuist does not support adding pre-actions or post-actions to RunAction, as well as ProfileAction and AnalyzeAction.

This PR is to add pre-actions and post-actions to RunAction and ProfileAction. (I learned while working on this that Xcode does not support pre-actions and post-actions on Analyze actions, so I'm leaving that one as-is.)

Checklist βœ…

  • The code architecture and patterns are consistent with the rest of the codebase.
  • The changes have been tested following the documented guidelines.
  • The CHANGELOG.md has been updated to reflect the changes. In case of a breaking change, it's been flagged as such.
  • In case the PR introduces changes that affect users, the documentation has been updated.
  • In case the PR introduces changes that affect how the cache artifact is generated starting from the TuistGraph.Target, the Constants.cacheVersion has been updated.

@hisaac hisaac requested a review from a team December 5, 2021 11:48
@hisaac hisaac self-assigned this Dec 5, 2021
@hisaac hisaac requested review from RomainBoulay and natanrolnik and removed request for a team December 5, 2021 11:48
Copy link
Collaborator

@kwridan kwridan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this @hisaac

I believe the missing connection is updating the SchemeDescriptorGenerator which is responsible for generating the Xcode schemes (descriptors).

@hisaac
Copy link
Collaborator Author

hisaac commented Dec 5, 2021

Thank you @kwridan! I'll take a look there and see if I can sort it out.

Copy link
Contributor

@pepicrft pepicrft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome @hisaac πŸš€ πŸš€ πŸš€ πŸš€

@hisaac hisaac force-pushed the add-pre-and-post-scheme-actions branch from 0aceac4 to a050f51 Compare December 8, 2021 16:24
@hisaac hisaac marked this pull request as ready for review December 8, 2021 16:25
@hisaac
Copy link
Collaborator Author

hisaac commented Dec 8, 2021

This should be ready for final review now. I've tested the changes on one of my projects, and have confirmed that it's working.

@hisaac hisaac changed the title [DRAFT] Add preActions and postActions to RunAction and ProfileAction Add preActions and postActions to RunAction and ProfileAction Dec 8, 2021
Copy link
Collaborator

@kwridan kwridan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing this and bringing consistency to the schemes APIs @hisaac πŸŽ‰

I've also tested locally with the ios_app_with_custom_scheme fixture

Copy link
Member

@fortmarek fortmarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution πŸ‘

@fortmarek fortmarek merged commit 7e56e70 into main Dec 9, 2021
@fortmarek fortmarek deleted the add-pre-and-post-scheme-actions branch December 9, 2021 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants