Main branch added
This commit is contained in:
parent
1d59358345
commit
b3312369d9
24 changed files with 9594 additions and 1 deletions
15
scripts/.vpython
Normal file
15
scripts/.vpython
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
python_version: "2.7"
|
||||
|
||||
# Used by:
|
||||
# auth.py
|
||||
# git_cl.py
|
||||
wheel: <
|
||||
name: "infra/python/wheels/httplib2-py2_py3"
|
||||
version: "version:0.10.3"
|
||||
>
|
||||
# Used by:
|
||||
# git_cl.py
|
||||
wheel: <
|
||||
name: "infra/python/wheels/six-py2_py3"
|
||||
version: "version:1.10.0"
|
||||
>
|
||||
38
scripts/init.js
Normal file
38
scripts/init.js
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
// Copyright (c) 2019 The Brave Authors. All rights reserved.
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// you can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
const fs = require('fs')
|
||||
const Log = require('../lib/logging')
|
||||
const path = require('path')
|
||||
const { spawnSync } = require('child_process')
|
||||
const util = require('../lib/util')
|
||||
|
||||
Log.progress('Performing initial checkout of brave-core')
|
||||
|
||||
const braveCoreDir = path.resolve(__dirname, '..', 'src', 'brave')
|
||||
const braveCoreRef = util.getProjectVersion('brave-core')
|
||||
|
||||
if (!fs.existsSync(path.join(braveCoreDir, '.git'))) {
|
||||
Log.status(`Cloning brave-core [${braveCoreRef}] into ${braveCoreDir}...`)
|
||||
fs.mkdirSync(braveCoreDir)
|
||||
util.runGit(braveCoreDir, ['clone', util.getNPMConfig(['projects', 'brave-core', 'repository', 'url']), '.'])
|
||||
util.runGit(braveCoreDir, ['checkout', braveCoreRef])
|
||||
}
|
||||
const braveCoreSha = util.runGit(braveCoreDir, ['rev-parse', 'HEAD'])
|
||||
Log.progress(`brave-core repo at ${braveCoreDir} is at commit ID ${braveCoreSha}`)
|
||||
|
||||
let npmCommand = 'npm'
|
||||
if (process.platform === 'win32') {
|
||||
npmCommand += '.cmd'
|
||||
}
|
||||
|
||||
util.run(npmCommand, ['install'], { cwd: braveCoreDir })
|
||||
|
||||
util.run(npmCommand, ['run', 'sync' ,'--', '--init'].concat(process.argv.slice(2)), {
|
||||
cwd: braveCoreDir,
|
||||
env: process.env,
|
||||
stdio: 'inherit',
|
||||
shell: true,
|
||||
git_cwd: '.', })
|
||||
Loading…
Add table
Add a link
Reference in a new issue