Vendor dependencies
Let's see how I like this workflow.
This commit is contained in:
parent
34d1830413
commit
9c435dc440
7500 changed files with 1665121 additions and 99 deletions
7
vendor/cxx/tools/buck/prelude/http_archive/tools/TARGETS.v2
vendored
Normal file
7
vendor/cxx/tools/buck/prelude/http_archive/tools/TARGETS.v2
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
prelude = native
|
||||
|
||||
prelude.python_bootstrap_binary(
|
||||
name = "create_exclusion_list",
|
||||
main = "create_exclusion_list.py",
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
36
vendor/cxx/tools/buck/prelude/http_archive/tools/create_exclusion_list.py
vendored
Normal file
36
vendor/cxx/tools/buck/prelude/http_archive/tools/create_exclusion_list.py
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
#
|
||||
# This source code is licensed under both the MIT license found in the
|
||||
# LICENSE-MIT file in the root directory of this source tree and the Apache
|
||||
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
|
||||
# of this source tree.
|
||||
|
||||
import argparse
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--tar-flag", action="append")
|
||||
parser.add_argument("--tar-archive")
|
||||
parser.add_argument("--exclude", action="append")
|
||||
parser.add_argument("--out")
|
||||
args = parser.parse_args()
|
||||
|
||||
exclusions = [re.compile(e) for e in args.exclude]
|
||||
files = subprocess.check_output(
|
||||
["tar", "--list", "-f", args.tar_archive] + args.tar_flag, encoding="utf-8"
|
||||
)
|
||||
files = [f.strip() for f in files.split()]
|
||||
|
||||
with open(args.out, "w", encoding="utf-8") as out:
|
||||
for f in files:
|
||||
if all(excl.match(f) is None for excl in exclusions):
|
||||
continue
|
||||
out.write("{}\n".format(f))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue