Open RichardLitt opened 7 years ago
I agree it would be a nice-to-have for merging options from semantic-release into an existing travis.yml file. If someone is up for it, be my guest, I fear that this will be non-trivial.
I usually let the CLI overwrite my current .travis file, look at the diff, then merge it manually.
I think that would be doable if we would build the CLI with yeoman which is exactly made for this type of tools. It automatically provides all the CLI stuff, like parsing and validating args, asking question to the use, validating the input etc.. plus a lot of generators that can be plugged together.
For example generator-travis adds properties to an existing .travis.yml
.
generator-travis-ci do something similar to us: set up Github-Travis integration, set up the Github token on Travis, update .travis.yml
. It could serve as an example.
yeoman is based on Inquirer.js so we could re-use a lot of the code we already have.
I didn't investigated too much, but I think it worth looking at it, at least to determine feasibility. If someone who's interested in Yeoman would want to look at it that would be awesome!
@pvdlg I don't think yeoman helps with this issue specifically - all generator-travis does is use yamljs to parse the YAML, set new properties and encode it again. Afaik Yeoman doesn't do any magic/assumptions about your generator besides providing a framework around inquirer and configuration.
I use semantic-release with Greenkeeper to make everything awesome. I suspect others do, too. However, there is currently no way to set it up automatically so that it automatically uses my current Travis file.
Ideally, you should be able to merge, or to provide an option for Greenkeeper to work together. Otherwise, I am continually forced to do a lot of manual work, which is difficult. I know this may be out of scope, but I would like to foster communication on how to fix this UX issue.