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):
|
class SimpleShipitTransformerFetcher(Fetcher):
|
||||||
def __init__(self, build_options, manifest):
|
def __init__(self, build_options, manifest, ctx):
|
||||||
self.build_options = build_options
|
self.build_options = build_options
|
||||||
self.manifest = manifest
|
self.manifest = manifest
|
||||||
self.repo_dir = os.path.join(build_options.scratch_dir, "shipit", manifest.name)
|
self.repo_dir = os.path.join(build_options.scratch_dir, "shipit", manifest.name)
|
||||||
|
self.ctx = ctx
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
if os.path.exists(self.repo_dir):
|
if os.path.exists(self.repo_dir):
|
||||||
@@ -553,13 +554,15 @@ class SimpleShipitTransformerFetcher(Fetcher):
|
|||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
mapping = ShipitPathMap()
|
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)
|
mapping.add_mapping(src, dest)
|
||||||
if self.manifest.shipit_fbcode_builder:
|
if self.manifest.shipit_fbcode_builder:
|
||||||
mapping.add_mapping(
|
mapping.add_mapping(
|
||||||
"fbcode/opensource/fbcode_builder", "build/fbcode_builder"
|
"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)
|
mapping.add_exclusion(pattern)
|
||||||
|
|
||||||
return mapping.mirror(self.build_options.fbsource_dir, self.repo_dir)
|
return mapping.mirror(self.build_options.fbsource_dir, self.repo_dir)
|
||||||
|
@@ -110,6 +110,8 @@ ALLOWED_EXPR_SECTIONS = [
|
|||||||
"install.files",
|
"install.files",
|
||||||
"rpms",
|
"rpms",
|
||||||
"debs",
|
"debs",
|
||||||
|
"shipit.pathmap",
|
||||||
|
"shipit.strip",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -382,7 +384,7 @@ class ManifestParser(object):
|
|||||||
and build_options.fbsource_dir
|
and build_options.fbsource_dir
|
||||||
and self.shipit_project
|
and self.shipit_project
|
||||||
):
|
):
|
||||||
return SimpleShipitTransformerFetcher(build_options, self)
|
return SimpleShipitTransformerFetcher(build_options, self, ctx)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
self.fbsource_path
|
self.fbsource_path
|
||||||
|
@@ -43,9 +43,13 @@ osxfuse
|
|||||||
[dependencies.not(os=windows)]
|
[dependencies.not(os=windows)]
|
||||||
libcurl
|
libcurl
|
||||||
|
|
||||||
[shipit.pathmap]
|
[shipit.pathmap.fb=on]
|
||||||
# for internal builds that use getdeps
|
# for internal builds that use getdeps
|
||||||
fbcode/common/rust/fbwhoami = common/rust/fbwhoami
|
fbcode/common/rust/fbwhoami = common/rust/fbwhoami
|
||||||
|
|
||||||
|
[shipit.pathmap]
|
||||||
|
# remove once autocargo in place for edenfs
|
||||||
|
fbcode/common/rust/fbwhoami = common/rust/fbwhoami
|
||||||
fbcode/common/rust/shed = common/rust/shed
|
fbcode/common/rust/shed = common/rust/shed
|
||||||
fbcode/configerator/structs/scm/hg = configerator/structs/scm/hg
|
fbcode/configerator/structs/scm/hg = configerator/structs/scm/hg
|
||||||
fbcode/eden/oss = .
|
fbcode/eden/oss = .
|
||||||
@@ -72,8 +76,10 @@ INSTALL_PYTHON_LIB=ON
|
|||||||
[cmake.defines.all(not(fb=on),os=windows)]
|
[cmake.defines.all(not(fb=on),os=windows)]
|
||||||
ENABLE_GIT=OFF
|
ENABLE_GIT=OFF
|
||||||
|
|
||||||
[cmake.defines.fb=on]
|
[cmake.defines.fbsource=on]
|
||||||
USE_CARGO_VENDOR=ON
|
USE_CARGO_VENDOR=ON
|
||||||
|
|
||||||
|
[cmake.defines.fb=on]
|
||||||
IS_FB_BUILD=ON
|
IS_FB_BUILD=ON
|
||||||
|
|
||||||
[depends.environment]
|
[depends.environment]
|
||||||
|
Reference in New Issue
Block a user