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

Side by Side Diff: tools/export_tarball/export_tarball.py

Issue 1982423002: Get rid of LASTCHANGE.blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 | « content/content_common.gypi ('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 (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """ 6 """
7 This tool creates a tarball with all the sources, but without .svn directories. 7 This tool creates a tarball with all the sources, but without .svn directories.
8 8
9 It can also remove files which are not strictly required for build, so that 9 It can also remove files which are not strictly required for build, so that
10 the resulting tarball can be reasonably small (last time it was ~110 MB). 10 the resulting tarball can be reasonably small (last time it was ~110 MB).
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 if len(args) != 1: 140 if len(args) != 1:
141 print 'You must provide only one argument: output file name' 141 print 'You must provide only one argument: output file name'
142 print '(without .tar.xz extension).' 142 print '(without .tar.xz extension).'
143 return 1 143 return 1
144 144
145 if not os.path.exists(GetSourceDirectory()): 145 if not os.path.exists(GetSourceDirectory()):
146 print 'Cannot find the src directory ' + GetSourceDirectory() 146 print 'Cannot find the src directory ' + GetSourceDirectory()
147 return 1 147 return 1
148 148
149 # These two commands are from src/DEPS; please keep them in sync. 149 # This command is from src/DEPS; please keep them in sync.
scottmg 2016/05/17 17:19:27 keep them -> keep it
scottmg 2016/05/17 17:20:40 Actually, 'keep them' is better (I interpreted ref
150 if subprocess.call(['python', 'build/util/lastchange.py', '-o', 150 if subprocess.call(['python', 'build/util/lastchange.py', '-o',
151 'build/util/LASTCHANGE'], cwd=GetSourceDirectory()) != 0: 151 'build/util/LASTCHANGE'], cwd=GetSourceDirectory()) != 0:
152 print 'Could not run build/util/lastchange.py to update LASTCHANGE.' 152 print 'Could not run build/util/lastchange.py to update LASTCHANGE.'
153 return 1 153 return 1
154 if subprocess.call(['python', 'build/util/lastchange.py', '-s',
155 'third_party/WebKit', '-o',
156 'build/util/LASTCHANGE.blink'],
157 cwd=GetSourceDirectory()) != 0:
158 print 'Could not run build/util/lastchange.py to update LASTCHANGE.blink.'
159 return 1
160 154
161 output_fullname = args[0] + '.tar' 155 output_fullname = args[0] + '.tar'
162 output_basename = options.basename or os.path.basename(args[0]) 156 output_basename = options.basename or os.path.basename(args[0])
163 157
164 archive = MyTarFile.open(output_fullname, 'w') 158 archive = MyTarFile.open(output_fullname, 'w')
165 archive.set_remove_nonessential_files(options.remove_nonessential_files) 159 archive.set_remove_nonessential_files(options.remove_nonessential_files)
166 archive.set_verbose(options.verbose) 160 archive.set_verbose(options.verbose)
167 try: 161 try:
168 if options.test_data: 162 if options.test_data:
169 for directory in TESTDIRS: 163 for directory in TESTDIRS:
(...skipping 18 matching lines...) Expand all
188 182
189 if rc != 0: 183 if rc != 0:
190 print 'xz -9 failed!' 184 print 'xz -9 failed!'
191 return 1 185 return 1
192 186
193 return 0 187 return 0
194 188
195 189
196 if __name__ == "__main__": 190 if __name__ == "__main__":
197 sys.exit(main(sys.argv[1:])) 191 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « content/content_common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698