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

Side by Side Diff: tools/release/update_node.py

Issue 2838843002: [tools] add script to simplify backporting patch to Node.js (Closed)
Patch Set: address comments Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « tools/release/test_backport_node.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2017 the V8 project authors. All rights reserved. 2 # Copyright 2017 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """
7 Use this script to update V8 in a Node.js checkout.
8
9 Requirements:
10 - Node.js checkout in which V8 should be updated.
11 - V8 checkout at the commit to which Node.js should be updated.
12
13 Usage:
14 $ update_node.py <path_to_v8> <path_to_node>
15
16 This will synchronize the content of <path_to_node>/deps/v8 with <path_to_v8>,
17 and a few V8 dependencies require in Node.js. It will also update .gitignore
18 appropriately.
19
20 Optional flags:
21 --gclient Run `gclient sync` on the V8 checkout before updating.
22 --commit Create commit with the updated V8 in the Node.js checkout.
23 --with-patch Also include currently staged files in the V8 checkout.
24 """
25
6 import argparse 26 import argparse
7 import os 27 import os
8 import shutil 28 import shutil
9 import subprocess 29 import subprocess
10 import sys 30 import sys
11 31
12 TARGET_SUBDIR = os.path.join("deps", "v8") 32 TARGET_SUBDIR = os.path.join("deps", "v8")
13 33
14 SUB_REPOSITORIES = [ ["base", "trace_event", "common"], 34 SUB_REPOSITORIES = [ ["base", "trace_event", "common"],
15 ["testing", "gtest"], 35 ["testing", "gtest"],
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 UpdateTarget([""], options) 161 UpdateTarget([""], options)
142 # Patch .gitignore before updating sub-repositories. 162 # Patch .gitignore before updating sub-repositories.
143 UpdateGitIgnore(options) 163 UpdateGitIgnore(options)
144 for repo in SUB_REPOSITORIES: 164 for repo in SUB_REPOSITORIES:
145 UpdateTarget(repo, options) 165 UpdateTarget(repo, options)
146 if options.commit: 166 if options.commit:
147 CreateCommit(options) 167 CreateCommit(options)
148 168
149 if __name__ == "__main__": 169 if __name__ == "__main__":
150 Main(sys.argv[1:]) 170 Main(sys.argv[1:])
OLDNEW
« no previous file with comments | « tools/release/test_backport_node.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698