提交 19cd8dea 编写于 作者: C Christian Moritz 提交者: Ryan Dahl

tools: download gn from CIPD (#2912)

上级 945dc7b8
......@@ -24,7 +24,7 @@ solutions = [{
}
}, {
'url':
'https://chromium.googlesource.com/chromium/tools/depot_tools@40bacee96a94600ad2179d69a8025469d119960f',
'https://chromium.googlesource.com/chromium/tools/depot_tools@efce0d1b7657c440c90f0f4bce614b96672b9e0b',
'name':
'depot_tools'
}, {
......
Subproject commit 71c3e6ebb675da304783757d9f7ff9ee790b835a
Subproject commit 4b36ce22a2ef7310f815acb6a2de0d26766a24b6
......@@ -4,6 +4,7 @@
import os
from os import path
import re
import site
import sys
from tempfile import mkdtemp
......@@ -208,9 +209,42 @@ def download_from_google_storage(item, bucket):
env=google_env())
# Download the given item from Chrome Infrastructure Package Deployment.
def download_from_cipd(item, version):
if sys.platform == 'win32':
root_dir = "v8/buildtools/win"
item += "windows-amd64"
elif sys.platform == 'darwin':
root_dir = "v8/buildtools/mac"
item += "mac-amd64"
elif sys.platform.startswith('linux'):
root_dir = "v8/buildtools/linux64"
item += "linux-amd64"
# init cipd if necessary
if not os.path.exists(path.join(tp(root_dir), ".cipd")):
run([
tp('depot_tools/cipd'),
'init',
tp(root_dir),
'-force',
],
env=google_env())
run([
tp('depot_tools/cipd'),
'install',
item,
'git_revision:' + version,
'-root',
tp(root_dir),
],
env=google_env())
# Download gn from Google storage.
def download_gn():
download_from_google_storage('gn', 'chromium-gn')
download_from_cipd('gn/gn/', '152c5144ceed9592c20f0c8fd55769646077569b')
# Download clang-format from Google storage.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册