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

Side by Side Diff: tools/build_command_buffer.py

Issue 1915063002: build_command_buffer: Don't 'git checkout' when --no-sync (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « no previous file | 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/python 1 #!/usr/bin/python
2 2
3 # Copyright 2016 Google Inc. 3 # Copyright 2016 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 8
9 """ 9 """
10 Script to build the command buffer shared library and copy it to Skia tree 10 Script to build the command buffer shared library and copy it to Skia tree
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 shared_lib_subdir = '' 107 shared_lib_subdir = ''
108 gclient = 'gclient.bat' 108 gclient = 'gclient.bat'
109 109
110 if not args.no_sync: 110 if not args.no_sync:
111 try: 111 try:
112 subprocess.check_call(['git', 'fetch'], cwd=chrome_src_dir) 112 subprocess.check_call(['git', 'fetch'], cwd=chrome_src_dir)
113 except subprocess.CalledProcessError as error: 113 except subprocess.CalledProcessError as error:
114 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode, 114 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode,
115 error.cmd, chrome_src_dir)) 115 error.cmd, chrome_src_dir))
116 116
117 try: 117 try:
118 subprocess.check_call(['git', 'checkout', args.chrome_revision], 118 subprocess.check_call(['git', 'checkout', args.chrome_revision],
119 cwd=chrome_src_dir) 119 cwd=chrome_src_dir)
120 except subprocess.CalledProcessError as error: 120 except subprocess.CalledProcessError as error:
121 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode, 121 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode,
122 error.cmd, chrome_src_dir)) 122 error.cmd, chrome_src_dir))
123 123
124 if not args.no_sync:
125 try: 124 try:
126 os.environ['GYP_GENERATORS'] = 'ninja' 125 os.environ['GYP_GENERATORS'] = 'ninja'
127 subprocess.check_call([gclient, 'sync', '--reset', '--force'], 126 subprocess.check_call([gclient, 'sync', '--reset', '--force'],
128 cwd=chrome_src_dir) 127 cwd=chrome_src_dir)
129 except subprocess.CalledProcessError as error: 128 except subprocess.CalledProcessError as error:
130 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode, 129 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode,
131 error.cmd, chrome_src_dir)) 130 error.cmd, chrome_src_dir))
132 131
133 try: 132 try:
134 subprocess.check_call(['ninja'] + shlex.split(args.extra_ninja_args) + 133 subprocess.check_call(['ninja'] + shlex.split(args.extra_ninja_args) +
(...skipping 21 matching lines...) Expand all
156 155
157 if not os.path.isfile(shared_lib_dst): 156 if not os.path.isfile(shared_lib_dst):
158 sys.exit('Command buffer library not copied to ' + shared_lib_dst) 157 sys.exit('Command buffer library not copied to ' + shared_lib_dst)
159 158
160 print('Command buffer library copied to ' + shared_lib_dst) 159 print('Command buffer library copied to ' + shared_lib_dst)
161 160
162 161
163 if __name__ == '__main__': 162 if __name__ == '__main__':
164 main() 163 main()
165 164
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698