dump crate licenses as part of update run
This commit is contained in:
parent
1b3922d6a5
commit
835c29f8ca
@ -452,3 +452,5 @@ alias(
|
|||||||
"manual",
|
"manual",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
exports_files(["licenses.json"])
|
||||||
|
2432
cargo/licenses.json
Normal file
2432
cargo/licenses.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -68,8 +68,23 @@ input("hit enter to proceed")
|
|||||||
if os.path.exists("remote"):
|
if os.path.exists("remote"):
|
||||||
shutil.rmtree("remote")
|
shutil.rmtree("remote")
|
||||||
subprocess.run(["cargo-raze"], check=True)
|
subprocess.run(["cargo-raze"], check=True)
|
||||||
|
|
||||||
|
# dump licenses
|
||||||
|
result = subprocess.check_output(["cargo", "license", "-j"])
|
||||||
|
with open("licenses.json", "wb") as file:
|
||||||
|
file.write(result)
|
||||||
|
|
||||||
os.remove("Cargo.toml")
|
os.remove("Cargo.toml")
|
||||||
|
|
||||||
|
# export license file
|
||||||
|
with open("BUILD.bazel", "a", encoding="utf8") as file:
|
||||||
|
file.write(
|
||||||
|
"""
|
||||||
|
exports_files(["licenses.json"])
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
# update shallow-since references for git crates
|
||||||
output_lines = []
|
output_lines = []
|
||||||
commit_re = re.compile('\s+commit = "([0-9a-f]+)",')
|
commit_re = re.compile('\s+commit = "([0-9a-f]+)",')
|
||||||
with open("crates.bzl") as file:
|
with open("crates.bzl") as file:
|
||||||
|
Loading…
Reference in New Issue
Block a user