mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
chore: clean up build_third_party.py
This commit is contained in:
parent
131e0ce4c7
commit
31eda28a64
2 changed files with 4 additions and 7 deletions
|
@ -9,27 +9,22 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import argparse
|
|
||||||
|
|
||||||
root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||||
third_party_path = os.path.join(root_path, "third_party")
|
third_party_path = os.path.join(root_path, "third_party")
|
||||||
script_name = "build_third_party.py"
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="""
|
|
||||||
This script updates the third party dependencies of deno.
|
|
||||||
""")
|
|
||||||
parser.parse_args()
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
os.chdir(third_party_path)
|
os.chdir(third_party_path)
|
||||||
run(["gclient", "sync", "--no-history"])
|
run(["gclient", "sync", "--no-history"])
|
||||||
run(["yarn"])
|
run(["yarn"])
|
||||||
print "Done (" + script_name + ")"
|
|
||||||
|
|
||||||
def run(args):
|
def run(args):
|
||||||
print " ".join(args)
|
print " ".join(args)
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
subprocess.check_call(args, env=env)
|
subprocess.check_call(args, env=env)
|
||||||
|
|
||||||
|
|
||||||
if '__main__' == __name__:
|
if '__main__' == __name__:
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -9,6 +9,8 @@ gn format rust.gni
|
||||||
gn format .gn
|
gn format .gn
|
||||||
|
|
||||||
yapf -i js/*.py
|
yapf -i js/*.py
|
||||||
|
yapf -i tools/*.py
|
||||||
|
|
||||||
prettier --write \
|
prettier --write \
|
||||||
js/deno.d.ts \
|
js/deno.d.ts \
|
||||||
js/main.ts \
|
js/main.ts \
|
||||||
|
|
Loading…
Reference in a new issue