runtime.getBrowserInfo() expose beta version build number
Categories
(WebExtensions :: General, defect, P5)
Tracking
(Not tracked)
People
(Reporter: ke5trel, Unassigned)
References
Details
Version values returned by runtime.getBrowserInfo():
> Nightly: 57.0a1
> Developer Edition: 56.0
> Beta: 56.0
> Release: 55.0
Beta version values lack the 'b' component (56.0b1) making them indistinguishable from release versions.
Comment 1•7 years ago
|
||
This is how version numbers are handled, but bug 1386076 should meet your needs.
I want to notify the user when the beta build number changes in a format that is familiar to the user. It looks like this would require AppConstants.MOZ_APP_VERSION_DISPLAY to be exposed.
Comment 3•7 years ago
|
||
I created bug 1386076 and yeah, the beta version number is a thing I need too, by the same reasons given in that bug.
Updated•7 years ago
|
Comment 4•7 years ago
|
||
I can add it as part of the patch for bug 1386076, or with other patch here. Is it then Ok to change to AppConstants.MOZ_APP_VERSION_DISPLAY as the value returned for the version number by runtime.getBrowserInfo, instead of the current implementation? I think that numbers for beta builds will be the only affected by this.
Updated•6 years ago
|
Comment 5•6 years ago
|
||
Bulk move of bugs per https://bugzilla.mozilla.org/show_bug.cgi?id=1483958
Comment 6•3 years ago
|
||
This is still a problem in recent beta builds. Is there any change that we can get that fixed? It will help a lot our users of the Nightly Tester Tools extension (https://github.com/mozilla/nightlytt/issues/204). If yes, what would be the right way to do it? Using AppConstants.MOZ_APP_VERSION_DISPLAY
instead for the value of version
?
Updated•3 years ago
|
Comment 7•3 years ago
|
||
I suspect the version number works that way for a reason. Maybe we should expose the update channel instead?
const { name, vendor, version, appBuildID } = Services.appinfo;
const info = { name, vendor, version, buildID: appBuildID, updateChannel: AppConstants.MOZ_UPDATE_CHANNEL };
Comment 8•3 years ago
|
||
Note that when using Nightly the version number that we currently get is 96.0a1
. So I wonder why beta / DevEdition doesn't include the build number in Services.appinfo.version
.
Also note that the update channel does not give the build number neither. It's just beta
or aurora
.
Mike, do you know why we have that difference?
Comment 9•3 years ago
|
||
Please don't use the update channel.
I don't know whether Services.appinfo.version should reflect the real version or not. But the general reason why the beta version is not fully available (apart from AppConstants.MOZ_APP_VERSION_DISPLAY) is that betas are meant to be as close to releases as possible. I don't know whether this rule applies to runtime.getBrowserInfo or not.
Comment 10•3 years ago
|
||
I have no idea what the implication of changing runtime.getBrowserInfo to use MOZ_APP_VERSION_DISPLAY would be in practice. But yes, Beta as currently constructed is meant to track closely as release-ready builds so the lack of beta build number in the version string was an intentional choice.
Comment 11•3 years ago
|
||
Could we instead have another property on BrowserInfo
like fullVersion
that relies on MOZ_APP_VERSION_DISPLAY
instead? If yes, which work would be required to get it implemented?
Comment 12•2 years ago
|
||
Not sure where suggestions for API additions are discussed. If that is the wrong component where else should it be made? Shane maybe you as triage owner can help? Thanks.
Comment 13•2 years ago
|
||
:whimboo a new property there should be fine. I don't like fullVersion -> VERSION_DISPLAY. I'd be more inclined towards firefoxVersion
: MOZ_APP_VERSION_DISPLAY to really avoid future name conflicts. Or maybe parse the beta version out to e.g. extraVersionInfo: "b1"
Updated•2 years ago
|
Description
•