Skip to content

Unable to obtain updater for 'manifest-beta.json' #28

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

Closed
Mara-Li opened this issue Jun 19, 2022 · 4 comments
Closed

Unable to obtain updater for 'manifest-beta.json' #28

Mara-Li opened this issue Jun 19, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@Mara-Li
Copy link

Mara-Li commented Jun 19, 2022

Describe the bug
When I try to use an "uncommon" manifest name, I have an error.
The manifest here is a valid json file, and the "normal" name (aka manifest.json) works. I use -beta for beta release on a specific workflow.

My config is :

"scripts": {
"beta": "commit-and-tag-version --prerelease --tag-build beta",
"community": "commit-and-tag-version --packageFiles package.json --bumpFiles manifest-beta.json"
},
"commit-and-tag-version": {
"t": "",
"bumpFiles": [
	{
	"filename": "manifest-beta.json",
	"type": "json"
	},
        {
	"filename": "package.json",
	"type": "json"
	}]}

Current behavior
Actually, the manifest-beta is not updated and skipped.

Log :

Unable to obtain updater for: "manifest-beta.json"
 - Error: Unsupported file (manifest-beta.json) provided for bumping.
 Please specify the updater `type` or use a custom `updater`.
 - Skipping...

Expected behavior
Should be updated as the manifest.

Environment

  • commit-and-tag-version version(s): [e.g. v6.0.0, v8.0.0, master] : 10.0.1
  • Node/npm version: [e.g. Node 10/npm 6]: v16.13.2 / 8.5.5
  • OS: [e.g. OSX 10.13.4, Windows 10] Windows 11

Possible Solution

  • get type based on .json
  • Possibility to add type directly in CLI
  • regex on "normal" name, and include every file with manifest.json in it. As \S*manifest\S*\.json$

Additional context
My goal is to separate release of manifest-beta and manifest but update manifest-beta when the manifest is updated.

@Mara-Li Mara-Li added the bug Something isn't working label Jun 19, 2022
@TimothyJones
Copy link
Member

Thanks for the report! If no one else has, I'll try to look at this in the next 7 days

@TimothyJones
Copy link
Member

Ok, so the problem here is that the --bumpFiles in the CLI is overriding the bumpFiles in the config stanza, and it's not possible to specify the type of the updater via the CLI. The tool is correctly complaining that it doesn't know the type of the updater.

For your specific use case, I think you can fix this by changing:

"community": "commit-and-tag-version --packageFiles package.json --bumpFiles manifest-beta.json"

to

"community": "commit-and-tag-version"

I'm not sure what the best way to improve commit-and-tag-version for this case is - here are some ideas:

  • Make it possible to specify the type of the updater via the CLI
  • Make it warn when a CLI setting is overriding the config
  • Try to infer the updater type from the file extension
  • Some other idea

What do you think?

@Mara-Li
Copy link
Author

Mara-Li commented Jun 24, 2022

I will try ! Thank you for this reply :)

@TimothyJones
Copy link
Member

I'll close this for now as the original issue is solved, and the underlying problem is covered by #31.

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