Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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:])) |
| OLD | NEW |