[FIX] runbot: update git before logging last commit

This commit is contained in:
Christophe Simonis 2019-03-07 10:40:54 +01:00
parent 4944d6a503
commit 10b456deda

View File

@ -547,13 +547,13 @@ class runbot_build(models.Model):
'Building environment',
'%s match branch %s of %s' % (server_match, closest_name, repo.name)
)
repo._update_git(force=True)
latest_commit = repo._git(['rev-parse', closest_name]).strip()
commit_oneline = repo._git(['show', '--pretty="%H -- %s"', '-s', latest_commit]).strip()
build._log(
'Building environment',
'Server built based on commit %s from %s' % (commit_oneline, closest_name)
)
repo._update_git(force=True)
repo._git_export(closest_name, build._path())
# Finally mark all addons to move to openerp/addons