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

Unable to use '--bumpFiles' command line arg the same way as the '.versionrc' file #44

Open
jan-mrm opened this issue Oct 9, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@jan-mrm
Copy link

jan-mrm commented Oct 9, 2022

Describe the bug
It seems so that I'm not able to hand the same structure into the command line arg --bumpFiles as by using the .versionrc file.

Current behavior
running commit-and-tag-version --bumpFiles "[{\"filename\":\"custom-bump-file.md\",\"updater\":\"custom-updater.js\"}]"

succeeds but without updating the custom-bump-file.md and with instead saying:

Unable to obtain updater for: "[{\"filename\":\"custom-bump-file.md\",\"updater\":\"custom-updater.js\"}]"
 - Error: Unsupported file ([{"filename":"custom-bump-file.md","updater":"custom-updater.js"}]) provided for bumping.

Expected behavior
I would like the command line arg to be able to work with the same input as the .versionrc file

Environment

  • commit-and-tag-version version(s): 10.1.0
  • Node/npm version: Node v18.7.0 / npm 8.15.0
  • OS: macOS Monterey 12.5

Possible Solution

I'm guessing the command line arg is not parsed/interpreted as a json object?

Additional context
Why am I not just use the .versionrc file: I would like to call the commit-and-tag-version tool multiple times with different configuration for which additional files (besides the CHANGELOG.md) to update. For that I would like to just hand over the different configuration using the --bumpFiles command line arg.

@jan-mrm jan-mrm added the bug Something isn't working label Oct 9, 2022
@TimothyJones
Copy link
Member

Thanks for the detailed report! You are correct that the way the config is parsed is different depending on how it is invoked.

I'd quite like to fix this - there's a little bit of context on #31, but basically what needs to happen is to generalise the configuration structure so that the source doesn't matter. It's a medium amount of effort, but something that would be a substantial improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants