зеркало из https://github.com/electron/electron.git
build: fail a build if some hooks don't succeed (#16369)
This commit is contained in:
Родитель
fd8b9450ee
Коммит
0a5adfe365
8
DEPS
8
DEPS
|
@ -107,7 +107,7 @@ hooks = [
|
|||
'action': [
|
||||
'python',
|
||||
'-c',
|
||||
'import os; os.chdir("src"); os.chdir("electron"); os.system("npm install")',
|
||||
'import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python", "script/lib/npm.py", "install"]);',
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ hooks = [
|
|||
'action': [
|
||||
'python',
|
||||
'-c',
|
||||
'import os; os.chdir("src"); os.chdir("electron"); os.chdir("vendor"); os.chdir("boto"); os.system("python setup.py build");',
|
||||
'import os, subprocess; os.chdir(os.path.join("src", "electron", "vendor", "boto")); subprocess.check_call(["python", "setup.py", "build"]);',
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -127,9 +127,9 @@ hooks = [
|
|||
'action': [
|
||||
'python',
|
||||
'-c',
|
||||
'import os; os.chdir("src"); os.chdir("electron"); os.chdir("vendor"); os.chdir("requests"); os.system("python setup.py build");',
|
||||
'import os, subprocess; os.chdir(os.path.join("src", "electron", "vendor", "requests")); subprocess.check_call(["python", "setup.py", "build"]);',
|
||||
],
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
recursedeps = [
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def npm(*npm_args):
|
||||
call_args = [__get_executable_name()] + list(npm_args)
|
||||
subprocess.check_call(call_args)
|
||||
|
||||
|
||||
def __get_executable_name():
|
||||
executable = 'npm'
|
||||
if sys.platform == 'win32':
|
||||
executable += '.cmd'
|
||||
return executable
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
npm(*sys.argv[1:])
|
Загрузка…
Ссылка в новой задаче