mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-08 18:02:05 +03:00
fbcode_builder: getdeps: add ArchiveFetcher
Summary: this fetcher knows how to download a URL that references an archive and extract the sources from it. Compressed tarballs and zipfiles are supported. Reviewed By: simpkins Differential Revision: D14690994 fbshipit-source-id: ffbbd1d9479b0d5aa3e5cd13fe11a560e9d01c2a
This commit is contained in:
committed by
Facebook Github Bot
parent
c4da97262f
commit
2d3cfa077f
@@ -11,7 +11,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
||||
import io
|
||||
|
||||
from .expr import parse_expr
|
||||
from .fetcher import GitFetcher
|
||||
from .fetcher import ArchiveFetcher, GitFetcher
|
||||
|
||||
|
||||
try:
|
||||
@@ -263,6 +263,12 @@ class ManifestParser(object):
|
||||
rev = self.get("git", "rev")
|
||||
return GitFetcher(build_options, self, repo_url, rev)
|
||||
|
||||
url = self.get("download", "url", ctx=ctx)
|
||||
if url:
|
||||
return ArchiveFetcher(
|
||||
build_options, self, url, self.get("download", "sha256", ctx=ctx)
|
||||
)
|
||||
|
||||
raise KeyError(
|
||||
"project %s has no fetcher configuration matching %r" % (self.name, ctx)
|
||||
)
|
||||
|
Reference in New Issue
Block a user