kibana/x-pack/build_chromium/init.py
Chris Davies 22aa6caba4
Convert Chromium reports to puppeteer (#21788)
Update Chromium to a recent version compatible with Puppeteer.

Update Chromium build scripts to initialize build environments and work with
recent versions of Chromium.

Modify Chromium reporting logic to be driven mostly by Puppeteer.
2018-08-29 20:16:06 -04:00

33 lines
1.1 KiB
Python

import os, platform
from build_util import runcmd, mkdir, md5_file, root_dir, configure_environment
# This is a cross-platform initialization script which should only be run
# once per environment, and isn't intended to be run directly. You should
# run the appropriate platform init script (e.g. Linux/init.sh) which will
# call this once the platform-specific initialization has completed.
os.chdir(root_dir)
# Configure git
runcmd('git config --global core.autocrlf false')
runcmd('git config --global core.filemode false')
runcmd('git config --global branch.autosetuprebase always')
# Grab Chromium's custom build tools, if they aren't already installed
# (On Windows, they are installed before this Python script is run)
if not os.path.isdir('depot_tools'):
runcmd('git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git')
# Put depot_tools on the path so we can properly run the fetch command
configure_environment()
# Fetch the Chromium source code
mkdir('chromium')
os.chdir('chromium')
runcmd('fetch chromium')
# Build Linux deps
if platform.system() == 'Linux':
os.chdir('src')
runcmd('build/install-build-deps.sh')