version-bump-prompt
version-bump-prompt copied to clipboard
Config file for defaults
Hi, awesome project!! I'd love to contribute.
I run bump --tag --commit every time one of my repos changes and I was thinking there would be a lot of convenience to have a .bumprc file to set default behavior and such. For me I would put tag=true and commit=true in the .bumprc file and only have to run bump from the project root. Thoughts?
I love this idea! Would gladly accept a PR to add this functionality. You could use a library like rc or cosmiconfig for this.
So my first thoughts are that the .bumprc file, if it exists, sets the spreads defaults for the cli.
For example, in a project .bumprc file I have these values: tag=true, commit=true, when I run bump --push in the project, it's pulling the defaults from the rc file and the command is actually bump --tag --commit --push.
This brings up the question of the cli flags accepting a parameter to override a .bumprc settings. For example, if I want to run bump --commit false because I don't want a commit to happen at this time but I also don't want to go edit the .bumprc file before I run the command. 🤔
Thoughts?
Very good point. I think the typical thing that most CLIs do is allow boolean arguments to be prefixed with no-. So you could do bump --no-commit --no-tag