diff options
author | Bert Belder <bertbelder@gmail.com> | 2018-12-13 21:56:53 +0100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-12-18 15:15:08 -0500 |
commit | b40326875cd9b3374fb8d02b14cf1bf588343abe (patch) | |
tree | 9c794af97f65a9cc9c35c7d5902ef2e1da375aa1 /tools/gcloud_upload.py | |
parent | 0481d6c2c05eedbab289a85d8bfe4b909013491d (diff) |
Remove prebuilt v8 support
Diffstat (limited to 'tools/gcloud_upload.py')
-rwxr-xr-x | tools/gcloud_upload.py | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/tools/gcloud_upload.py b/tools/gcloud_upload.py deleted file mode 100755 index b919a1ed9..000000000 --- a/tools/gcloud_upload.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python -# Prereq: -# - gcloud auth login -# - gcloud config set project deno-223616 -# This program uploads the specified file to GCloud Storage in the denoland -# bucket. It places a checksum file into the current directory using the base -# filename of the specified file. - -import os -import sys -import hashlib -from util import root_path, run -from third_party import tp - - -def print_usage(): - print "Usage: ./tools/gcloud_upload.py target/release/libv8.a" - sys.exit(1) - - -def compute_sha1(filename): - m = hashlib.sha1() - with open(filename) as f: - m.update(f.read()) - return m.hexdigest() - - -def main(argv): - if len(argv) != 2: - print_usage() - os.chdir(root_path) - - filename = sys.argv[1] - basename = os.path.basename(filename) - - sha1 = compute_sha1(filename) - print sha1 - - gs_url = "gs://denoland/" + sha1 - - #gsutil = tp("depot_tools/gsutil.py") - gsutil = "gsutil" # standalone installation - - run([gsutil, "cp", filename, gs_url]) - run([gsutil, "acl", "ch", "-u", "AllUsers:R", gs_url]) - - target_filename = basename + ".sha1" - with open(target_filename, 'w') as f: - f.write(sha1) - print "Wrote", target_filename - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) |