Files
sousa-gecko/testing/mozbase/docs/mozversion.md
T
Sylvestre Ledru 8f033c8241 Bug 2038819 - Convert testing/**/docs RST to Markdown r=jdescottes,firefox-source-docs-reviewers,ahal
Convert testing/{awsy,condprofile,docs,geckodriver,marionette,
mozbase,mozharness,perfdocs,performance,raptor,talos,web-platform}
RST documentation files to MyST-flavored Markdown.

Skips testing/perfdocs/generated/* (auto-generated by mach perfdocs)
and testing/web-platform/tests/* (third-party test trees).

- Move treeherder-try frontmatter substitutions under the new myst
  topmatter key.
- Allow the pre-existing autodoc Unknown target warning for
  mozprofile.permissions to keep the build clean.
- Refresh allowed-warnings glob for manifest-sandbox download from
  .rst to .md.

Differential Revision: https://phabricator.services.mozilla.com/D304228
2026-07-04 10:18:34 +00:00

76 lines
1.7 KiB
Markdown

# {mod}`mozversion` --- Get application information
[mozversion](https://hg.mozilla.org/mozilla-central/file/tip/testing/mozbase/mozversion)
provides version information such as the application name and the changesets
that it has been built from. This is commonly used in reporting or for
conditional logic based on the application under test.
## API Usage
```{eval-rst}
.. automodule:: mozversion
:members: get_version
```
### Examples
Firefox:
```
import mozversion
version = mozversion.get_version(binary='/path/to/firefox')
for (key, value) in sorted(version.items()):
if value:
print '%s: %s' % (key, value)
```
Firefox for Android:
```
version = mozversion.get_version(binary='path/to/firefox.apk')
print version['application_changeset'] # gets hg revision of build
```
## Command Line Usage
mozversion comes with a command line program, `mozversion` which may be used to
get version information from an application.
Usage:
```
mozversion [options]
```
### Options
#### ---binary
This is the path to the target application binary or .apk. If this is omitted
then the current directory is checked for the existence of an
application.ini file. If not found, then it is assumed the target
application is a remote Firefox OS instance.
### Examples
Firefox:
```
$ mozversion --binary=/path/to/firefox-bin
application_buildid: 20131205075310
application_changeset: 39faf812aaec
application_name: Firefox
application_repository: http://hg.mozilla.org/releases/mozilla-release
application_version: 26.0
platform_buildid: 20131205075310
platform_changeset: 39faf812aaec
platform_repository: http://hg.mozilla.org/releases/mozilla-release
```
Firefox for Android:
```
$ mozversion --binary=/path/to/firefox.apk
```