[cli] add option to run setup-ci after project is created #425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is a proposition of how
create-expo-stackcould integrate with setup-ci. It adds a prompt asking the user whether they want to bootstrap CI usingsetup-ciafter the project is created and runssetup-ciin a subprocess at the end if the answer was "Yes".Some details:
setup-cioption to config, therefore the prompt appears after the user is asked whether they want to save their configuration,noInstall == false,noGit == falseandpackageManagerisyarnornpm, these are requirements forsetup-cito work in the generated project,setup-ci, an env variable is setprocess.env.RUN_SETUP_CI = 'true', which is later read to decide whether the script should be run - this way we don't add new fields tocliResults, which would in turn alter the project configuration interface.Demo
setup-ci-in-ces-demo.mov
How Has This Been Tested?
2.11.240.6.0macOS Sonoma 14.7Verified that
npx setup-cifinishes execution successfully and generates all CI workflows when run on projects created withcreate-expo-stackusing following configurations.