Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/WebKit/Source/devtools/scripts/local_node/node.py

Issue 2338753003: DevTools: Make eslint mandatory and check node.js/npm modules in presubmit (Closed)
Patch Set: address CL feedback Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/scripts/local_node/node.py
diff --git a/third_party/WebKit/Source/devtools/scripts/buildbot/node.py b/third_party/WebKit/Source/devtools/scripts/local_node/node.py
similarity index 93%
rename from third_party/WebKit/Source/devtools/scripts/buildbot/node.py
rename to third_party/WebKit/Source/devtools/scripts/local_node/node.py
index 55c0156d4ccf677b7da248b8d29201584b509549..b0dda027d94817a9571d4d08bfcab4ec5535723f 100755
--- a/third_party/WebKit/Source/devtools/scripts/buildbot/node.py
+++ b/third_party/WebKit/Source/devtools/scripts/local_node/node.py
@@ -13,7 +13,12 @@ import urllib2
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
-DEFAULT_VERSION = '4.5.0'
+if len(sys.argv) < 2:
+ print('Usage: {} <version>'.format(sys.argv[0]))
lushnikov 2016/10/12 22:10:19 you already have a way to pass Node version in via
chenwilliam 2016/10/17 19:32:27 Done.
+ print(' <version> Specific node.js version (e.g. 4.5.0)')
+ sys.exit(1)
+
+DEFAULT_VERSION = sys.argv[1]
BUCKET = 'chromium-nodejs'
@@ -39,7 +44,7 @@ def install_latest_node_js(version, tmp_dir):
if sys.platform == 'win32':
target = 'node.exe'
elif sys.platform == 'darwin':
- target = 'node-v%s-darwin-x86.tar.gz' % version
+ target = 'node-v%s-darwin-x64.tar.gz' % version
elif sys.platform == 'linux2':
target = 'node-v%s-linux-x86.tar.gz' % version
else:
@@ -112,7 +117,7 @@ def main(mode=None):
# TODO(hinoka): How about Windows...?
bin_location = os.path.join(os.path.dirname(bin_location), 'npm')
- return subprocess.call([bin_location, ] + sys.argv[1:])
+ return subprocess.call([bin_location, ] + sys.argv[2:])
if __name__ == '__main__':

Powered by Google App Engine
This is Rietveld 408576698