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

Side by Side Diff: tools/make_version.py

Issue 350483003: Build Tools Cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: more fixes as reviewed by ricow Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « tools/make_links.py ('k') | tools/only_in_release_mode.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 # 4 #
5 # This python script creates a version string in a C++ file. 5 # This python script creates a version string in a C++ file.
6 6
7 import sys 7 import sys
8 import time 8 import time
9 from optparse import OptionParser 9 from optparse import OptionParser
10 import utils 10 import utils
11 11
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 help="input template file") 43 help="input template file")
44 44
45 (options, args) = parser.parse_args() 45 (options, args) = parser.parse_args()
46 if not options.output: 46 if not options.output:
47 sys.stderr.write('--output not specified\n') 47 sys.stderr.write('--output not specified\n')
48 return -1 48 return -1
49 if not len(options.input): 49 if not len(options.input):
50 sys.stderr.write('--input not specified\n') 50 sys.stderr.write('--input not specified\n')
51 return -1 51 return -1
52 52
53 files = [ ] 53 files = []
54 for arg in args: 54 for arg in args:
55 files.append(arg) 55 files.append(arg)
56 56
57 if not makeFile(options.output, options.input): 57 if not makeFile(options.output, options.input):
58 return -1 58 return -1
59 59
60 return 0 60 return 0
61 except Exception, inst: 61 except Exception, inst:
62 sys.stderr.write('make_version.py exception\n') 62 sys.stderr.write('make_version.py exception\n')
63 sys.stderr.write(str(inst)) 63 sys.stderr.write(str(inst))
64 sys.stderr.write('\n') 64 sys.stderr.write('\n')
65 return -1 65 return -1
66 66
67 if __name__ == '__main__': 67 if __name__ == '__main__':
68 exit_code = main(sys.argv) 68 exit_code = main(sys.argv)
69 sys.exit(exit_code) 69 sys.exit(exit_code)
OLDNEW
« no previous file with comments | « tools/make_links.py ('k') | tools/only_in_release_mode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698