build: document electron goma usage and add the external binaries (#21622)
This commit is contained in:
parent
0a850fbc5d
commit
e18acb4380
4 changed files with 85 additions and 2 deletions
|
@ -5,6 +5,7 @@ import errno
|
|||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import tarfile
|
||||
|
||||
from lib.config import PLATFORM, get_target_arch
|
||||
from lib.util import add_exec_bit, download, extract_zip, rm_rf, \
|
||||
|
@ -51,8 +52,12 @@ def main():
|
|||
|
||||
temp_path = download_binary(base_url, version, binary['url'], binary['sha'])
|
||||
|
||||
# We assume that all binaries are in zip archives.
|
||||
extract_zip(temp_path, output_dir)
|
||||
if temp_path.endswith('.zip'):
|
||||
extract_zip(temp_path, output_dir)
|
||||
else:
|
||||
tar = tarfile.open(temp_path, "r:gz")
|
||||
tar.extractall(output_dir)
|
||||
tar.close()
|
||||
|
||||
# Hack alert. Set exec bit for sccache binaries.
|
||||
# https://bugs.python.org/issue15795
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue