Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file for defaults #32

Open
crobinson42 opened this issue Jun 4, 2019 · 3 comments
Open

Config file for defaults #32

crobinson42 opened this issue Jun 4, 2019 · 3 comments

Comments

@crobinson42
Copy link

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?

@JamesMessinger
Copy link
Member

I love this idea! Would gladly accept a PR to add this functionality. You could use a library like rc or cosmiconfig for this.

@crobinson42
Copy link
Author

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?

@JamesMessinger
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants