OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2009 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 # Author: mpcomplete | 6 # Author: mpcomplete |
7 # | 7 # |
8 # This script updates and does a clean build of chrome for you. | 8 # This script updates and does a clean build of chrome for you. |
9 # Usage: python chrome-update.py C:\path\to\chrome\trunk | 9 # Usage: python chrome-update.py C:\path\to\chrome\trunk |
10 # | 10 # |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 parser.add_option("", "--solution", default="src\\chrome\\chrome.sln", | 126 parser.add_option("", "--solution", default="src\\chrome\\chrome.sln", |
127 help="path to the .sln file to build (absolute, or " | 127 help="path to the .sln file to build (absolute, or " |
128 "relative to chrome trunk") | 128 "relative to chrome trunk") |
129 parser.add_option("", "--release", action="store_true", default=False, | 129 parser.add_option("", "--release", action="store_true", default=False, |
130 help="build the release configuration in addition of the " | 130 help="build the release configuration in addition of the " |
131 "debug configuration.") | 131 "debug configuration.") |
132 parser.add_option("", "--nosync", action="store_true", default=False, | 132 parser.add_option("", "--nosync", action="store_true", default=False, |
133 help="doesn't sync before building") | 133 help="doesn't sync before building") |
134 parser.add_option("", "--print-latest", action="store_true", default=False, | 134 parser.add_option("", "--print-latest", action="store_true", default=False, |
135 help="print the latest buildable revision and exit") | 135 help="print the latest buildable revision and exit") |
136 options, args = parser.parse_args() | 136 options, args = parser.parse_args(None) |
137 | 137 |
138 if options.print_latest: | 138 if options.print_latest: |
139 print GetRevision() or "HEAD" | 139 print GetRevision() or "HEAD" |
140 sys.exit(0) | 140 sys.exit(0) |
141 | 141 |
142 if not args: | 142 if not args: |
143 Message("Usage: %s <path\\to\\chrome\\root> [options]" % sys.argv[0]) | 143 Message("Usage: %s <path\\to\\chrome\\root> [options]" % sys.argv[0]) |
144 sys.exit(1) | 144 sys.exit(1) |
145 | 145 |
146 chrome_root = args[0] | 146 chrome_root = args[0] |
(...skipping 17 matching lines...) Expand all Loading... |
164 if rv != 0: | 164 if rv != 0: |
165 Message("Release build failed. Sad face :(") | 165 Message("Release build failed. Sad face :(") |
166 | 166 |
167 if rv != 0: | 167 if rv != 0: |
168 sys.exit(rv) | 168 sys.exit(rv) |
169 | 169 |
170 Message("Success!") | 170 Message("Success!") |
171 | 171 |
172 if __name__ == "__main__": | 172 if __name__ == "__main__": |
173 Main() | 173 Main() |
OLD | NEW |