mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: export git tree at current time
When doing a `git archive`, all the files in the tar archive are set to the commit date. Ignore this date during extraction. Having the files with dates in future will make some tests about assets to fail. These tests force the asset regeneration by `touch`ing one js/css file. If other bundle files are still older that the one we touch, the asset is not regenerated and the test fail.
This commit is contained in:
parent
920c3edcee
commit
b46980ab91
@ -241,7 +241,7 @@ class runbot_repo(osv.osv):
|
||||
for repo in self.browse(cr, uid, ids, context=context):
|
||||
_logger.debug('checkout %s %s %s', repo.name, treeish, dest)
|
||||
p1 = subprocess.Popen(['git', '--git-dir=%s' % repo.path, 'archive', treeish], stdout=subprocess.PIPE)
|
||||
p2 = subprocess.Popen(['tar', '-xC', dest], stdin=p1.stdout, stdout=subprocess.PIPE)
|
||||
p2 = subprocess.Popen(['tar', '-xmC', dest], stdin=p1.stdout, stdout=subprocess.PIPE)
|
||||
p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits.
|
||||
p2.communicate()[0]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user