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

Side by Side Diff: tools/clang/scripts/package.py

Issue 1717693002: clang/scripts/package.py: return exit code 0, when nothing to do. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2015 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2015 The Chromium 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 """This script will check out llvm and clang, and then package the results up 6 """This script will check out llvm and clang, and then package the results up
7 to a tgz file.""" 7 to a tgz file."""
8 8
9 import argparse 9 import argparse
10 import fnmatch 10 import fnmatch
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 # Check if Google Cloud Storage already has the artifacts we want to build. 144 # Check if Google Cloud Storage already has the artifacts we want to build.
145 if (args.upload and GsutilArchiveExists(pdir, platform) and 145 if (args.upload and GsutilArchiveExists(pdir, platform) and
146 not sys.platform.startswith('linux') or 146 not sys.platform.startswith('linux') or
147 GsutilArchiveExists(golddir, platform)): 147 GsutilArchiveExists(golddir, platform)):
148 print ('Desired toolchain revision %s is already available ' 148 print ('Desired toolchain revision %s is already available '
149 'in Google Cloud Storage:') % expected_stamp 149 'in Google Cloud Storage:') % expected_stamp
150 print 'gs://chromium-browser-clang/%s/%s.tgz' % (platform, pdir) 150 print 'gs://chromium-browser-clang/%s/%s.tgz' % (platform, pdir)
151 if sys.platform.startswith('linux'): 151 if sys.platform.startswith('linux'):
152 print 'gs://chromium-browser-clang/%s/%s.tgz' % (platform, golddir) 152 print 'gs://chromium-browser-clang/%s/%s.tgz' % (platform, golddir)
153 return 1 153 return 0
154 154
155 with open('buildlog.txt', 'w') as log: 155 with open('buildlog.txt', 'w') as log:
156 Tee('Diff in llvm:\n', log) 156 Tee('Diff in llvm:\n', log)
157 TeeCmd(['svn', 'stat', LLVM_DIR], log, fail_hard=False) 157 TeeCmd(['svn', 'stat', LLVM_DIR], log, fail_hard=False)
158 TeeCmd(['svn', 'diff', LLVM_DIR], log, fail_hard=False) 158 TeeCmd(['svn', 'diff', LLVM_DIR], log, fail_hard=False)
159 Tee('Diff in llvm/tools/clang:\n', log) 159 Tee('Diff in llvm/tools/clang:\n', log)
160 TeeCmd(['svn', 'stat', os.path.join(LLVM_DIR, 'tools', 'clang')], 160 TeeCmd(['svn', 'stat', os.path.join(LLVM_DIR, 'tools', 'clang')],
161 log, fail_hard=False) 161 log, fail_hard=False)
162 TeeCmd(['svn', 'diff', os.path.join(LLVM_DIR, 'tools', 'clang')], 162 TeeCmd(['svn', 'diff', os.path.join(LLVM_DIR, 'tools', 'clang')],
163 log, fail_hard=False) 163 log, fail_hard=False)
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 with tarfile.open(golddir + '.tgz', 'w:gz') as tar: 288 with tarfile.open(golddir + '.tgz', 'w:gz') as tar:
289 tar.add(os.path.join(golddir, 'lib'), arcname='lib', 289 tar.add(os.path.join(golddir, 'lib'), arcname='lib',
290 filter=PrintTarProgress) 290 filter=PrintTarProgress)
291 MaybeUpload(args, golddir, platform) 291 MaybeUpload(args, golddir, platform)
292 292
293 # FIXME: Warn if the file already exists on the server. 293 # FIXME: Warn if the file already exists on the server.
294 294
295 295
296 if __name__ == '__main__': 296 if __name__ == '__main__':
297 sys.exit(main()) 297 sys.exit(main())
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