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

Unified Diff: tools/buildtools/update.py

Issue 2861903002: Revert "[infra] Roll clang to match the version used by Flutter" (Closed)
Patch Set: Created 3 years, 8 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 | « tools/buildtools/mac/clang-format ('k') | tools/buildtools/win/clang-format.exe.sha1 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/buildtools/update.py
diff --git a/tools/buildtools/update.py b/tools/buildtools/update.py
deleted file mode 100755
index 6d676293aa43f3d1b1112c82f05cc6caa84c9e41..0000000000000000000000000000000000000000
--- a/tools/buildtools/update.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2017 The Dart project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Pulls down tools required to build Dart."""
-
-import os
-import subprocess
-import shutil
-import sys
-
-THIS_DIR = os.path.abspath(os.path.dirname(__file__))
-DART_ROOT = os.path.abspath(os.path.join(THIS_DIR, '..', '..'))
-BUILDTOOLS = os.path.join(DART_ROOT, 'buildtools')
-TOOLS_BUILDTOOLS = os.path.join(DART_ROOT, 'tools', 'buildtools')
-
-sys.path.insert(0, os.path.join(DART_ROOT, 'tools'))
-import find_depot_tools
-
-DEPOT_PATH = find_depot_tools.add_depot_tools_to_path()
-
-
-def Update():
- path = os.path.join(BUILDTOOLS, 'update.sh')
- return subprocess.call(['/bin/bash', path, '--toolchain', '--gn'], cwd=DART_ROOT)
-
-
-def UpdateGNOnWindows():
- sha1_file = os.path.join(BUILDTOOLS, 'win', 'gn.exe.sha1')
- downloader_script = os.path.join(DEPOT_PATH, 'download_from_google_storage.py')
- download_cmd = [
- 'python',
- downloader_script,
- '--no_auth',
- '--no_resume',
- '--quiet',
- '--platform=win*',
- '--bucket',
- 'chromium-gn',
- '-s',
- sha1_file
- ]
- return subprocess.call(download_cmd)
-
-
-def UpdateClangFormatOnWindows():
- sha1_file = os.path.join(TOOLS_BUILDTOOLS, 'win', 'clang-format.exe.sha1')
- output_dir = os.path.join(BUILDTOOLS, 'win', 'clang-format.exe')
- downloader_script = os.path.join(DEPOT_PATH, 'download_from_google_storage.py')
- download_cmd = [
- 'python',
- downloader_script,
- '--no_auth',
- '--no_resume',
- '--quiet',
- '--platform=win',
- '--bucket',
- 'chromium-clang-format',
- '-s',
- sha1_file,
- '-o',
- output_dir
- ]
- return subprocess.call(download_cmd)
-
-
-def CopyClangFormatScripts():
- linux_script = os.path.join(TOOLS_BUILDTOOLS, 'linux64', 'clang-format')
- mac_script = os.path.join(TOOLS_BUILDTOOLS, 'mac', 'clang-format')
- linux_dest = os.path.join(BUILDTOOLS, 'linux64', 'clang-format')
- mac_dest = os.path.join(BUILDTOOLS, 'mac', 'clang-format')
- shutil.copy2(linux_script, linux_dest)
- shutil.copy2(mac_script, mac_dest)
-
-
-def main(argv):
- if sys.platform.startswith('win'):
- result = UpdateGNOnWindows()
- if result != 0:
- return result
- return UpdateClangFormatOnWindows()
- CopyClangFormatScripts()
- return Update()
-
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))
« no previous file with comments | « tools/buildtools/mac/clang-format ('k') | tools/buildtools/win/clang-format.exe.sha1 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698