From: Cheng Zhao Date: Sat, 3 Aug 2013 08:16:32 +0000 (+0800) Subject: Update node before running npm. X-Git-Tag: v0.2.0~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=192216ea648819e61e4dd7b3755f90d7ed3a88ab;p=electron.git Update node before running npm. --- diff --git a/.gitmodules b/.gitmodules index 2d9c5644..b741dfe6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "vendor/depot_tools"] path = vendor/depot_tools url = https://chromium.googlesource.com/chromium/tools/depot_tools.git +[submodule "vendor/apm"] + path = vendor/apm + url = https://github.com/github/apm.git diff --git a/script/bootstrap.py b/script/bootstrap.py index 3768db41..e4fd91b1 100755 --- a/script/bootstrap.py +++ b/script/bootstrap.py @@ -11,6 +11,7 @@ from lib.util import * SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) VENDOR_DIR = os.path.join(SOURCE_ROOT, 'vendor') +NODE_VERSION = 'v0.10.15' BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' PYTHON_26_URL = 'https://chromium.googlesource.com/chromium/deps/python_26' @@ -21,9 +22,10 @@ def main(): args = parse_args() if not args.skip_network: update_submodules() + update_node() update_node_modules() bootstrap_brightray(args.url) - if sys.platform == 'cygwin': + if sys.platform is 'cygwin': update_win32_python() touch_config_gypi() @@ -50,6 +52,11 @@ def update_submodules(): '--recursive']) +def update_node(): + un = os.path.join('script', 'update-node.py') + subprocess.check_call([sys.executable, un, '--version', NODE_VERSION]) + + def bootstrap_brightray(url): bootstrap = os.path.join(VENDOR_DIR, 'brightray', 'script', 'bootstrap') subprocess.check_call([sys.executable, bootstrap, url]) diff --git a/script/update.py b/script/update.py index acb20844..38c02470 100755 --- a/script/update.py +++ b/script/update.py @@ -7,29 +7,25 @@ from lib.util import * SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) -NODE_VERSION = 'v0.10.15' def main(): os.chdir(SOURCE_ROOT) - update_frameworks_and_node(NODE_VERSION) + update_frameworks() update_gyp() -def update_frameworks_and_node(version): - if sys.platform == 'darwin': +def update_frameworks(): + if sys.platform is 'darwin': uf = os.path.join('script', 'update-frameworks.py') subprocess.check_call([sys.executable, uf]) - un = os.path.join('script', 'update-node.py') - subprocess.check_call([sys.executable, un, '--version', version]) - def update_gyp(): gyp = os.path.join('vendor', 'gyp', 'gyp_main.py') python = sys.executable - if sys.platform == 'cygwin': + if sys.platform is 'cygwin': python = os.path.join('vendor', 'python_26', 'python.exe') subprocess.call([python, gyp, '-f', 'ninja', '--depth', '.', 'atom.gyp', diff --git a/vendor/apm b/vendor/apm new file mode 160000 index 00000000..1cda00c8 --- /dev/null +++ b/vendor/apm @@ -0,0 +1 @@ +Subproject commit 1cda00c8507bad369b08a507907a7f96d27f022c