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

bower version still uses bower.json, contradicting the spec #2139

Closed
hdgarrood opened this issue Jan 6, 2016 · 9 comments
Closed

bower version still uses bower.json, contradicting the spec #2139

hdgarrood opened this issue Jan 6, 2016 · 9 comments

Comments

@hdgarrood
Copy link

For example, with Bower 1.7.2:

$ bower version major
bower EINVALIDVERSION      Invalid version argument: `major`. Usage: `bower version [<newversion> | major | minor | patch]`

The same happens with minor, patch, and build.

@rajasekarm
Copy link
Contributor

@hdgarrood I think there is a small typo in your command. It should be bower --version major

@rajasekarm rajasekarm reopened this Jan 7, 2016
@rajasekarm
Copy link
Contributor

@sheerun I think we have to change the logger message to
bower EINVALIDVERSION Invalid version argument: major. Usage: `bower --version [ | major | minor | patch]'*

@hdgarrood
Copy link
Author

@rajzshkr no, I meant what I wrote. Or perhaps the documentation is wrong: http://bower.io/docs/api/#version

@hdgarrood
Copy link
Author

bower version seems to me like it should definitely be a subcommand, not an option.

@rajasekarm
Copy link
Contributor

@hdgarrood oops. I made a wrong assumption.

@hdgarrood
Copy link
Author

I think this ought to be considered a bug, not an enhancement. It's very clearly not doing what the docs say it should do.

@hdgarrood
Copy link
Author

Looking at the code, it seems the problem is that Bower is expecting the version to be in bower.json, and erroring if it isn't there. So I'm pretty certain that's what's causing the error I'm seeing.

Given that the spec claims that Bower ignores this field, I think this is a bug. If I sent a PR which made Bower ignore the version in the JSON when running bower version, so that it was based only on git tags, would that be accepted?

hdgarrood added a commit to hdgarrood/bower that referenced this issue Jan 8, 2016
`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.
hdgarrood added a commit to hdgarrood/bower that referenced this issue Jan 8, 2016
`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.
hdgarrood added a commit to hdgarrood/bower that referenced this issue Jan 8, 2016
Fixes bower#2139.

Make `bower version` operate solely on git tags, ignoring the version
field in bower.json (if it exists).
hdgarrood added a commit to hdgarrood/bower that referenced this issue Jan 8, 2016
`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.
hdgarrood added a commit to hdgarrood/bower that referenced this issue Jan 8, 2016
Fixes bower#2139.

Make `bower version` operate solely on git tags, ignoring the version
field in bower.json (if it exists).
hdgarrood added a commit to hdgarrood/bower that referenced this issue Jan 8, 2016
`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.
hdgarrood added a commit to hdgarrood/bower that referenced this issue Jan 8, 2016
Fixes bower#2139.

Make `bower version` operate solely on git tags, ignoring the version
field in bower.json (if it exists).
@hdgarrood hdgarrood changed the title bower version does not work with semver.inc arguments bower version still uses bower.json, contradicting the spec Jan 8, 2016
hdgarrood added a commit to hdgarrood/bower that referenced this issue Apr 2, 2016
`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.
hdgarrood added a commit to hdgarrood/bower that referenced this issue Apr 2, 2016
Fixes bower#2139.

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

@hdgarrood Have you submitted a PR?

@hdgarrood
Copy link
Author

I did, and it was merged. See #2232 and #2142.

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

No branches or pull requests

4 participants