mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
tools: download gn from CIPD (#2912)
This commit is contained in:
parent
945dc7b84b
commit
19cd8deaf2
3 changed files with 37 additions and 3 deletions
|
@ -24,7 +24,7 @@ solutions = [{
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
'url':
|
'url':
|
||||||
'https://chromium.googlesource.com/chromium/tools/depot_tools@40bacee96a94600ad2179d69a8025469d119960f',
|
'https://chromium.googlesource.com/chromium/tools/depot_tools@efce0d1b7657c440c90f0f4bce614b96672b9e0b',
|
||||||
'name':
|
'name':
|
||||||
'depot_tools'
|
'depot_tools'
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 71c3e6ebb675da304783757d9f7ff9ee790b835a
|
Subproject commit 4b36ce22a2ef7310f815acb6a2de0d26766a24b6
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from os import path
|
from os import path
|
||||||
|
import re
|
||||||
import site
|
import site
|
||||||
import sys
|
import sys
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
|
@ -208,9 +209,42 @@ def download_from_google_storage(item, bucket):
|
||||||
env=google_env())
|
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.
|
# Download gn from Google storage.
|
||||||
def download_gn():
|
def download_gn():
|
||||||
download_from_google_storage('gn', 'chromium-gn')
|
download_from_cipd('gn/gn/', '152c5144ceed9592c20f0c8fd55769646077569b')
|
||||||
|
|
||||||
|
|
||||||
# Download clang-format from Google storage.
|
# Download clang-format from Google storage.
|
||||||
|
|
Loading…
Reference in a new issue