-
Notifications
You must be signed in to change notification settings - Fork 121
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
Support package.json and component.json (and other json) bumping simultneously #21
Conversation
Instead of bumping a series of files, wouldn't it be more robust to have an authorative place for the semver (e.g. package.json), bump this, and then copy/replace that version over to other sources (e.g. myplugin.jquery.json, but also source files)? |
Yeah, that makes sense. |
Ok, actually, i don't think it does. At least, not grunt-replace. Because grunt-replace is for replacing a variable reference like @@Version while copying files. I don't see how it will work for files like bower.json and component.json that need the version number to be present in their original source location. We'd have to keep a non-replaced form in a different directory and the replaced form in the main directory. This will certainly confuse contributers and needlessly duplicates the file. I think my solution is probably the better one, after playing around with grunt-replace. |
I still like the idea of a single 'canonical' place for the number. Maybe |
Was thinking about grunt-version. I'm not very familiar with the capabilities of node/grunt, but it seems to me that a grunt-version plugin would be best if it could, by default, scan the root directory for json files, and update any root-level 'version' property in them. It could have |
This is a tricky issue. Say you're developing a project that contains both a node module (uses package.json) and a bower component (bower.json). The node module likely has a different version number, and gets published to npm rather than the bower registry. Forcing them to be on the same version isn't flexible enough. Ultimately I think I'm going to separate out all the tasks into their own plugins, and make grunt-release use them all with a sensible default (same as current) so grunt-release can continue to be used with little or no config. I'll hack on that this weekend. |
Closing this issue, think we're going to go the separate tasks route. |
This adds a files option (defaulting to ['component.json']), allowing multiple json descriptors to be updated as part of a grunt-release task.