[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-stack
could integrate with setup-ci. It adds a prompt asking the user whether they want to bootstrap CI usingsetup-ci
after the project is created and runssetup-ci
in a subprocess at the end if the answer was "Yes".Some details:
setup-ci
option to config, therefore the prompt appears after the user is asked whether they want to save their configuration,noInstall == false
,noGit == false
andpackageManager
isyarn
ornpm
, these are requirements forsetup-ci
to 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.24
0.6.0
macOS Sonoma 14.7
Verified that
npx setup-ci
finishes execution successfully and generates all CI workflows when run on projects created withcreate-expo-stack
using following configurations.