[cli] add option to run setup-ci after project is created#425
[cli] add option to run setup-ci after project is created#425katzper-michno wants to merge 1 commit intoroninoss:mainfrom
Conversation
|
this is on my radar will get to it soon. Initial thoughts are that I think we can ditch the env var and just let it be an extra prompt like the others For right now we should just worry about getting it into the cli. We are actively considering other approaches to reduce the number of prompts, but that should be a separate concern. I realise we were the ones to bring up that concern so sorry if thats confusing 😅 |
|
thanks for your initial thoughts! There is a prompt, but the env variable is there to move the information whether I wanted to avoid getting |
|
oh ok interesting, didn't realise that. I will have to check again to see what you mean about the interface |
|
i'm going to dig into this this week |
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.