mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-09-09 17:33:30 +00:00
gitver: Pass git directory argument to gitrev_run
${GITSHA} gives the following error otherwise
gitrev_run() missing 1 required positional argument: 'path'
Signed-off-by: Saikiran Madugula <hummerbliss@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
10c39b96a2
commit
0e342ecaa4
@ -48,7 +48,7 @@ def get_git_hash(d):
|
|||||||
srcdir = d.getVar("EXTERNALSRC") or d.getVar("S")
|
srcdir = d.getVar("EXTERNALSRC") or d.getVar("S")
|
||||||
gitdir = os.path.abspath(os.path.join(srcdir, ".git"))
|
gitdir = os.path.abspath(os.path.join(srcdir, ".git"))
|
||||||
try:
|
try:
|
||||||
rev = gitrev_run("git rev-list HEAD -1")
|
rev = gitrev_run("git rev-list HEAD -1", gitdir)
|
||||||
return rev[:7]
|
return rev[:7]
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
bb.fatal(str(exc))
|
bb.fatal(str(exc))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user