mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-07 07:02:53 +03:00
allow expressions for shipit manifest entries
Summary: Add expressions for shipit entries so that we can map different directories if needed Differential Revision: D33947996 fbshipit-source-id: e765769ae5a6ab90055b63284e538b965d6071b3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e287f366fb
commit
b5dfb025b6
@@ -542,10 +542,11 @@ def get_fbsource_repo_data(build_options):
|
||||
|
||||
|
||||
class SimpleShipitTransformerFetcher(Fetcher):
|
||||
def __init__(self, build_options, manifest):
|
||||
def __init__(self, build_options, manifest, ctx):
|
||||
self.build_options = build_options
|
||||
self.manifest = manifest
|
||||
self.repo_dir = os.path.join(build_options.scratch_dir, "shipit", manifest.name)
|
||||
self.ctx = ctx
|
||||
|
||||
def clean(self):
|
||||
if os.path.exists(self.repo_dir):
|
||||
@@ -553,13 +554,15 @@ class SimpleShipitTransformerFetcher(Fetcher):
|
||||
|
||||
def update(self):
|
||||
mapping = ShipitPathMap()
|
||||
for src, dest in self.manifest.get_section_as_ordered_pairs("shipit.pathmap"):
|
||||
for src, dest in self.manifest.get_section_as_ordered_pairs(
|
||||
"shipit.pathmap", self.ctx
|
||||
):
|
||||
mapping.add_mapping(src, dest)
|
||||
if self.manifest.shipit_fbcode_builder:
|
||||
mapping.add_mapping(
|
||||
"fbcode/opensource/fbcode_builder", "build/fbcode_builder"
|
||||
)
|
||||
for pattern in self.manifest.get_section_as_args("shipit.strip"):
|
||||
for pattern in self.manifest.get_section_as_args("shipit.strip", self.ctx):
|
||||
mapping.add_exclusion(pattern)
|
||||
|
||||
return mapping.mirror(self.build_options.fbsource_dir, self.repo_dir)
|
||||
|
Reference in New Issue
Block a user