• L
    job: Improve _get_avocado_git_version · 5117d996
    Lukáš Doktor 提交于
    Previously the _get_avocado_git_version used current directory to
    attempt to find out whether it's being executed from git sources, anyway
    this fails when running from other directory, or when running
    rpm-version while being inside avocado.git dir. This version uses
    `os.path.dirname(__file__)`, which should be in git-tree, unless one
    uses special configuration.
    
    Note we could use `dirname(dirname(dirname(__file__)))` but that would
    only work for python2 as python3 requires py2to3 fixtures, which are
    usually produced in `build` directory within the sources, therefor
    `git` is going to find the expected files just fine.
    Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
    5117d996
job.py 23.3 KB