From b46980ab913fa302511445254e78780cbaad231d Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 1 Sep 2016 12:36:36 +0200 Subject: [PATCH] [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. --- runbot/runbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot/runbot.py b/runbot/runbot.py index 88b48756..6cb638a6 100644 --- a/runbot/runbot.py +++ b/runbot/runbot.py @@ -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]