Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2210)

Unified Diff: mojo/tools/upload_shell_binary.py

Issue 670073002: Revert of Add gclient hook to download prebuilt mojo_shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/BUILD.gn ('k') | tools/find_depot_tools.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/upload_shell_binary.py
diff --git a/mojo/tools/upload_shell_binary.py b/mojo/tools/upload_shell_binary.py
deleted file mode 100755
index 2acd06f03454b035982bf05ed7380f21ff7c03e1..0000000000000000000000000000000000000000
--- a/mojo/tools/upload_shell_binary.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import subprocess
-import sys
-import tempfile
-import time
-import zipfile
-
-root_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
- "..", "..")
-version_path = os.path.join(root_path, "mojo", "public", "VERSION")
-version_file = open(version_path)
-version = version_file.read().strip()
-
-sys.path.insert(0, os.path.join(root_path, "tools"))
-# pylint: disable=F0401
-import find_depot_tools
-
-
-binary_path = os.path.join(root_path, "out", "Release", "mojo_shell")
-
-dest = "gs://mojo/shell/" + version + "/linux-x64.zip"
-
-depot_tools_path = find_depot_tools.add_depot_tools_to_path()
-gsutil_exe = os.path.join(depot_tools_path, "third_party", "gsutil", "gsutil")
-
-with tempfile.NamedTemporaryFile() as zip_file:
- with zipfile.ZipFile(zip_file, 'w') as z:
- with open(binary_path) as shell_binary:
- zipinfo = zipfile.ZipInfo("mojo_shell")
- zipinfo.external_attr = 0777 << 16L
- zipinfo.compress_type = zipfile.ZIP_DEFLATED
- zipinfo.date_time = time.gmtime(os.path.getmtime(binary_path))
- z.writestr(zipinfo, shell_binary.read())
- subprocess.check_call([gsutil_exe, "cp", zip_file.name, dest])
« no previous file with comments | « mojo/shell/BUILD.gn ('k') | tools/find_depot_tools.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698