Skip to content
Gerald Jansen edited this page Nov 18, 2023 · 3 revisions

It is good practice to report the Hamster version when filing an issue. For installed Hamster you can get this from the command line as [/path/to/]hamster version. For an uninstalled clone of the hamster repo use [/path/to/hamster-clone/]src/hamster-cli.py version. You may need to issue pkill -ef hamster*.service to kill active dbus services before the previous commands.

See PR #738 for changes in version handling from 3.0.3 on.

For determining the hamster version, there are currently two interfaces:

  • The hamster.version variable is to be used from within hamster itself, to figure out the version of the code that is currently running. This works both when installed or running out of a source tree (git checkout or unpacked tarball). When not installed, this version includes an "(uninstalled)" suffix.
  • The src/hamster/version.py script can be run by itself to get the version of the source tree, to be used by e.g. waf or later github actions to get the source tree version (does not work when installed). This does not return the "(uninstalled)" suffix.

To find the actual version number, three options are tried in order:

  • The hamster/defs.py file. This file is not present in the source tree, but generated by waf during install. This is only considered for hamster.version, not for the src/hamster/version.py script.
  • The git version. This runs git describe with some options to figure out the most recent tag, any commits made on top of this, and if the source tree is modified. For example, 3.0.2-75-ga0fe41d0+ indicates that the most recent tag is 3.0.2, 75 commits have been made since then, the most recent commit is a0fe41d0 and the source tree was modified. When the current version is an unmodified tag, this returns just the version number.
  • The contents of src/hamster/VERSION. This is used for source trees without git information (typically when installing from a tarball git export for releases). This file only has meaningful content in git for release commits, and is reverted to a plain unreleased value directly after the release (but during development the git version should usually be used).
Clone this wiki locally