From cad366009045adaae0359b9d0c55d33d0f106d61 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 10 Nov 2015 22:36:52 +0900 Subject: Added gzip file support to lorry The new 'gzip' lorry file is practical for any gzipped single file repositories, this can be useful for some static blob resources, such as fonts. Change-Id: I931e15e4c1291d820db82d0fc764aa767d3df9ab --- lorry | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lorry') diff --git a/lorry b/lorry index 2759f54..7dfebee 100755 --- a/lorry +++ b/lorry @@ -192,7 +192,8 @@ class Lorry(cliapp.Application): 'hg': self.gitify_hg, 'svn': self.gitify_svn, 'tarball': functools.partial(self.gitify_archive, 'tar'), - 'zip': functools.partial(self.gitify_archive, 'zip') + 'zip': functools.partial(self.gitify_archive, 'zip'), + 'gzip': functools.partial(self.gitify_archive, 'gzip') } vcstype = spec['type'] if vcstype not in table: @@ -500,7 +501,7 @@ class Lorry(cliapp.Application): cwd=gitdir) def gitify_archive(self, archive_type, project_name, dirname, gitdir, spec): - assert archive_type in ['zip', 'tar'] + assert archive_type in ['zip', 'gzip', 'tar'] url = spec['url'] url_path = urllib2.urlparse.urlparse(url)[2] -- cgit v1.2.1