diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/build_benchmark_jsons.py | 9 | ||||
-rwxr-xr-x | tools/build_website.py | 8 | ||||
-rwxr-xr-x | tools/docs.py | 5 | ||||
-rwxr-xr-x | tools/upload_docs.py | 13 | ||||
-rwxr-xr-x | tools/upload_website.py | 22 |
5 files changed, 17 insertions, 40 deletions
diff --git a/tools/build_benchmark_jsons.py b/tools/build_benchmark_jsons.py index 1d7a03401..b7223992b 100755 --- a/tools/build_benchmark_jsons.py +++ b/tools/build_benchmark_jsons.py @@ -5,15 +5,14 @@ from benchmark import read_json, write_json import os current_data_file = os.path.join(build_path(), "bench.json") -gh_pages_data_file = "gh-pages/data.json" -all_data_file = "website/data.json" # Includes all benchmark data. -recent_data_file = "website/recent.json" # Includes recent 20 benchmark data. +all_data_file = "gh-pages/data.json" # Includes all benchmark data. +recent_data_file = "gh-pages/recent.json" # Includes recent 20 benchmark data. assert os.path.exists(current_data_file) -assert os.path.exists(gh_pages_data_file) +assert os.path.exists(all_data_file) new_data = read_json(current_data_file) -all_data = read_json(gh_pages_data_file) +all_data = read_json(all_data_file) all_data.append(new_data) write_json(all_data_file, all_data) diff --git a/tools/build_website.py b/tools/build_website.py deleted file mode 100755 index b519f3853..000000000 --- a/tools/build_website.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python -# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import os -from util import run, root_path, build_path - -os.chdir(os.path.join(root_path, "website")) -deno_exe = os.path.join(build_path(), "deno") -run([deno_exe, "bundle", "app.ts", "app.bundle.js"]) diff --git a/tools/docs.py b/tools/docs.py index 6c420f89c..01af75468 100755 --- a/tools/docs.py +++ b/tools/docs.py @@ -6,11 +6,6 @@ from util import run, root_path target_path = os.path.join(root_path, "target/") -os.chdir(root_path) - -# Builds into target/doc -run(["cargo", "doc", "--all", "--no-deps", "-vv"]) - # 'deno types' is stored in js/lib.deno_runtime.d.ts # We want to run typedoc on that declaration file only. os.chdir(os.path.join(root_path, "cli/js")) diff --git a/tools/upload_docs.py b/tools/upload_docs.py new file mode 100755 index 000000000..7fe8857a6 --- /dev/null +++ b/tools/upload_docs.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python +# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. +import os +import sys +from util import run, root_path + +os.chdir(root_path) +run([sys.executable, "tools/docs.py"]) +os.chdir("target") +run([ + "aws", "s3", "sync", "--include=typedoc", "--exclude=debug/*", + "--exclude=release/*", ".", "s3://deno.land/" +]) diff --git a/tools/upload_website.py b/tools/upload_website.py deleted file mode 100755 index e1d100f99..000000000 --- a/tools/upload_website.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import os -import sys -import tempfile -from util import run, root_path, build_path - -# Probably run tools/docs.py first. -# AWS CLI must be installed separately. - -os.chdir(os.path.join(root_path, "website")) - -deno_exe = os.path.join(build_path(), "deno") -run([sys.executable, "../tools/build_website.py"]) - -# Invalidate the cache. -run([ - "aws", "cloudfront", "create-invalidation", "--distribution-id", - "E2HNK8Z3X3JDVG", "--paths", "/*" -]) - -run(["aws", "s3", "sync", ".", "s3://deno.land/"]) |