[libvirt] [Libvirt]How to get libvirt version after git clone?

Hi all, After i clone libvirt git repo, how i could get this libvirt version exactly? $ git clone git://libvirt.org/libvirt.git $ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/v0.10.2-maint remotes/origin/v0.9.11-maint remotes/origin/v0.9.6-maint I can just see up stuffs but exact current version. Could anyone give me some suggestions? Thanks in advance. -- Thanks Harry Wei

2013/2/2 harryxiyou <harryxiyou@gmail.com>:
Hi all,
After i clone libvirt git repo, how i could get this libvirt version exactly?
$ git clone git://libvirt.org/libvirt.git $ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/v0.10.2-maint remotes/origin/v0.9.11-maint remotes/origin/v0.9.6-maint
I can just see up stuffs but exact current version. Could anyone give me some suggestions? Thanks in advance.
You can look at the AC_INIT line in configure.ac AC_INIT([libvirt], [1.0.2], [libvir-list@redhat.com], [], [http://libvirt.org]) the second argument is the latest released version. You can also use git describe --abbrev=0 to get the latest tag, as released versions and release candidates are tagged. -- Matthias Bolte http://photron.blogspot.com

On Sat, Feb 2, 2013 at 9:49 PM, Matthias Bolte <matthias.bolte@googlemail.com> wrote: [...]
You can look at the AC_INIT line in configure.ac
AC_INIT([libvirt], [1.0.2], [libvir-list@redhat.com], [], [http://libvirt.org])
the second argument is the latest released version.
This is just the *latest released version* but my download libvirt repo's version.
You can also use
git describe --abbrev=0
to get the latest tag, as released versions and release candidates are tagged.
This is the latest tag. I think download libvirt repo may have no version, which has just latest released version or latest tag, right? -- Thanks Harry Wei

On 02/02/2013 08:07 AM, harryxiyou wrote:
On Sat, Feb 2, 2013 at 9:49 PM, Matthias Bolte <matthias.bolte@googlemail.com> wrote: [...]
You can look at the AC_INIT line in configure.ac
AC_INIT([libvirt], [1.0.2], [libvir-list@redhat.com], [], [http://libvirt.org])
the second argument is the latest released version.
This is just the *latest released version* but my download libvirt repo's version.
You can also use
git describe --abbrev=0
to get the latest tag, as released versions and release candidates are tagged.
This is the latest tag. I think download libvirt repo may have no version, which has just latest released version or latest tag, right?
Running the latest commit in the libvirt.git:master branch is the latest version. We don't go to any effort to give it a different version number, though, so the built product will match the latest release (currently 1.0.2). Perhaps we could tweak things so that when built from git, 'virsh --version' would report the git version that was used to build things, but so far, that hasn't been on anyone's high-priority list. It is generally assumed that if you are competent enough to be building directly from latest git, then you are also competent to know how to use 'git describe' to tell what commit you are building. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
harryxiyou
-
Matthias Bolte