X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=libguestfs.ml;h=508cbeb9dfb52f3e33c59ed4bf53999fa8b4810c;hb=428096c1c01b9942c62105e547eaa6c7d44e6ce1;hp=2fe867a9c9b258d6325ca0c692bc6c8146e0db7c;hpb=2b5c3a7099d0ef718c466be184eec162f7030eb5;p=goaljobs-goals.git diff --git a/libguestfs.ml b/libguestfs.ml index 2fe867a..508cbeb 100644 --- a/libguestfs.ml +++ b/libguestfs.ml @@ -94,6 +94,15 @@ let git_latest_version branch = cd %s/repos/%s-%s git describe --tags --abbrev=0 " buildtmp package (quote branch) in + (* Branches <= 1.32 are tagged with "1.32.11", + * branches >= 1.33 are tagged with "v1.33.11". + *) + let len = String.length v in + let v = + if len > 0 && v.[0] = 'v' then + String.sub v 1 (len-1) + else + v in vernames v (* Get the latest commit. *)