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

Syncing versions #1

Closed
IngwiePhoenix opened this issue Dec 24, 2015 · 5 comments
Closed

Syncing versions #1

IngwiePhoenix opened this issue Dec 24, 2015 · 5 comments

Comments

@IngwiePhoenix
Copy link

Would be nice if we could sync the version from package.json to the other JSONs. In my case, I want to keep my composer, bower and package JSONs in sync, version-wise.

is that be possible to be added?

@JamesMessinger
Copy link
Member

That's a great idea! In fact, it probably makes sense for that to be the default behavior. It'll be a major version bump, since it's not backward-compatible, but no big deal. And there will be an argument for people who want to allow different versions in different files. Something like this:

Bump the minor version number in package.json (by default), and then set the version number in other files (bower.json, component.json) to the same value as package.json.

bump --minor

Prompt for the new version number, based on the current version in package.json (by default). Once the user chooses a version, set that version in all files (package.json, bower.json, component.json)

bump --prompt

If specific file names are listed, then first file is the "master" file, and its version number will be used. This also allows you to specify files other than the default ones (package.json, bower.json, component.json).

Bump the minor version number in bower.json (the first file), and then set the version number in the other files (package.json, some_other_file.json) to the same value as bower.json.

bump --minor bower.json package.json some_other_file.json

Prompt for the new version number, based on the current version in bower.json (the first file). Once the user chooses a version, set that version in all files (bower.json, package.json, some_other_file.json)

bump --prompt bower.json package.json some_other_file.json

If you want to allow different version numbers in each file, then you just add the --different-versions flag. That makes it work the same as it does today, but also still allows you to specify a custom list of files to be updated. Each file will be updated separately, based on the existing version number in that file.

@IngwiePhoenix
Copy link
Author

Sounds totally fine with me! Ill just add it as an NPM script and that should have it. :)

When can I expect the bump to happen?

@JamesMessinger
Copy link
Member

I'm super busy right now, so it might be a few weeks before I get this done. Feel free to send me a pull-request if you want it sooner and feel like implementing it yourself in the meantime.

@IngwiePhoenix
Copy link
Author

Ahh okay. :) Well I'll consider it. I have quite some code going myself (the activity tab on my profile gives it away, haha)

@JamesMessinger
Copy link
Member

I just released version 5.0.0, which resolves this issue.

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

No branches or pull requests

2 participants