torchbox/wagtail — pull request #259 by davecranwell (2014-05-23 13:34:08+00:00)
Title: Convenience feature: version number now output on dashboard

This feature detects the exact git checkout a Wagtail instance is on. This is primarily for agency use, so that in the scenario where a bug is reported, agents can see at a glance whether an old/specific version of Wagtail is to blame.

It depends on the existence of a .git directory within the wagtail root folder. This wouldn't exist for pypi versions, but as these are likely to be more stable than a random checkout from git, the value of a version number display is probably lessened.

If no version number is found, or the git checking process fails, the whole thing aborts and no version is displayed at all.

If the version number returned matches one of Git's "dirty tree" formats (e.g v1.0-123-g123124) the version will be linked to the precise checkout on github.