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

Omit runPostActionsOnFailure scheme attribute when not enabled #3087

Merged
merged 3 commits into from
Jun 21, 2021

Conversation

kwridan
Copy link
Collaborator

@kwridan kwridan commented Jun 21, 2021

Resolves: #2991

Short description πŸ“

  • Xcode automatically removes the runPostActionsOnFailure when not enabled
  • This causes projects to get modified by Xcode after generation even though semantically they are equivalent (causes issues for workflows where generated issues are checked in)
  • To mitigate this, the runPostActionsOnFailure is omitted incase it's not enabled and only set when enabled

Test Plan πŸ› 

  • Generate a fixture that does't have the runPostActionsOnFailure option enabled

e.g.

swift build
swift run tuist generate --path projects/tuist/fixtures/ios_app_with_tests
  • Verify the generated schemes do not contain the runPostActionsOnFailure attribute
  • Generate a fixture that has the runPostActionsOnFailure option enabled
swift build
swift run tuist generate --path projects/tuist/fixtures/ios_app_with_custom_scheme
  • Verify the App-debug scheme's build action has the runPostActionsOnFailure set

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.

Resolves: tuist#2991

- Xcode automatically removes the `runPostActionsOnFailure` when not enabled
- This causes projects to get modified by Xcode after generation even though semantically they are equivalent (causes issues for workflows where generated issues are checked in)
- To mitigate this, the `runPostActionsOnFailure` is omitted incase it's not enabled and only set when enabled

Test Plan:

- Generate a fixture that does't have the `runPostActionsOnFailure` option enabled

e.g.

```sh
swift build
swift run tuist generate --path projects/tuist/fixtures/ios_app_with_tests
```

- Verify the generated schemes do not contain the `runPostActionsOnFailure` attribute
- Generate a fixture that has the `runPostActionsOnFailure` option enabled

```sh
swift build
swift run tuist generate --path projects/tuist/fixtures/ios_app_with_custom_scheme
```

- Verify the App-debug scheme's build action has the `runPostActionsOnFailure` set
@kwridan kwridan requested a review from fortmarek June 21, 2021 16:15
@pepicrft pepicrft merged commit 46214ba into tuist:main Jun 21, 2021
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.

Unnecessary default scheme attribute runPostActionsOnFailure in generated projects
2 participants