[CRIU] [PATCH 2/2] version: Print git id if present

Kir Kolyshkin kir at openvz.org
Fri Sep 13 13:50:30 EDT 2013


On 09/13/2013 08:35 AM, Cyrill Gorcunov wrote:
> If criu is built from git repo print git commit id, convenient for debug.
>
> For example
>
>   | $ ./criu -V
>   | Version: 0.7
>   | GitID: 7985251


You can actually do something like

VERSION=$(shell git describe --tags HEAD | sed 's/^v//')

and in case it's a release it will be say 0.7, otherwise
something like 0.7-18-gd3a7d8f.


More information about the CRIU mailing list