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

Ignore bower.json "version" field in bower version #2142

Closed
wants to merge 4 commits into from

Conversation

hdgarrood
Copy link

Fixes #2139. See the commits for a description of the changes. I just went ahead and did this, because it was easy.

I was thinking that it might be a good idea to warn if the "version" field exists, too. If you agree, where should that go?

Also, if bower now uses tags for versions, I suppose we should support svn too?

@hdgarrood hdgarrood force-pushed the fix-version-with-semver branch 2 times, most recently from 74eeaee to 77a84e8 Compare January 8, 2016 02:00
@hdgarrood
Copy link
Author

Also, if this change is too drastic, an alternative approach could be to update the spec and un-deprecate the "version" field. I think we should definitely do one of these two things - currently, the spec is not consistent with Bower's behaviour.

@faceleg
Copy link
Member

faceleg commented Jan 14, 2016

Pinging @bower/contributors

@sheerun
Copy link
Contributor

sheerun commented Apr 1, 2016

I think it's good to merge, but we should use git describe --abbrev=0 --tags to detect current git version. This will allow minor/patch bumps on legacy branches.

`bower version` currently takes the version from the "version" field of
bower.json, but the spec says that bower ignores it.

This commit updates the `bower version` tests so that they are
consistent with the spec. Now, the tests are based on the assumption
that `bower version` should only use git tags.
Fixes bower#2139.

Make `bower version` operate solely on git tags, ignoring the version
field in bower.json (if it exists).
@hdgarrood
Copy link
Author

Done; how's this?

@sheerun
Copy link
Contributor

sheerun commented Apr 4, 2016

Close, but it doesn't preserve v prefix. So if someone doesn't has folliwing tags: 0.1.0, 0.1.1, then patch bump creates v0.1.2 instead of 0.1.2.

@sheerun
Copy link
Contributor

sheerun commented Apr 4, 2016

Also --help documentation is not updated

@sheerun
Copy link
Contributor

sheerun commented Apr 4, 2016

Possible PR successor at #2232

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

Successfully merging this pull request may close these issues.

None yet

3 participants