Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 import glob | 7 import glob |
| 8 import optparse | 8 import optparse |
| 9 import os.path | 9 import os.path |
| 10 import re | 10 import re |
| 11 import subprocess | 11 import subprocess |
| 12 import sys | 12 import sys |
| 13 import utils | 13 import utils |
| 14 | 14 |
| 15 # FIXME: integrate this helper script into the build instead of hardcoding | 15 # FIXME: integrate this helper script into the build instead of hardcoding |
| 16 # these paths. | 16 # these paths. |
| 17 RESOURCE_AAR_PATTERN = 'content_shell_apk/resource_aar/*.aar' | 17 RESOURCE_AAR_PATTERN = 'content_shell_apk/resource_aar/*.aar' |
| 18 CONTENT_SHELL_APK_AAR = 'content_shell_apk/content_shell_apk.aar' | 18 CONTENT_SHELL_APK_AAR = 'content_shell_apk/content_shell_apk.aar' |
| 19 | 19 |
| 20 SRC_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | 20 SRC_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", "..") |
|
blois
2014/09/09 18:18:50
line length
| |
| 21 | |
| 21 DART_DIR = os.path.join(SRC_PATH, 'dart') | 22 DART_DIR = os.path.join(SRC_PATH, 'dart') |
| 22 CHROME_VERSION_PATH = os.path.join(SRC_PATH, 'chrome', 'VERSION') | 23 CHROME_VERSION_PATH = os.path.join(SRC_PATH, 'chrome', 'VERSION') |
| 23 | 24 |
| 24 def main(): | 25 def main(): |
| 25 parser = optparse.OptionParser() | 26 parser = optparse.OptionParser() |
| 26 parser.add_option('--mode', dest='mode', | 27 parser.add_option('--mode', dest='mode', |
| 27 action='store', type='string', | 28 action='store', type='string', |
| 28 help='Build mode (Debug or Release)') | 29 help='Build mode (Debug or Release)') |
| 29 parser.add_option('--repo', action='store', type='string', | 30 parser.add_option('--repo', action='store', type='string', |
| 30 help='Local Maven repository (defaults to ~/.m2)') | 31 help='Local Maven repository (defaults to ~/.m2)') |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 revision_match = re.search('Last Changed Rev: (\d+)', output) | 132 revision_match = re.search('Last Changed Rev: (\d+)', output) |
| 132 if revision_match: | 133 if revision_match: |
| 133 return revision_match.group(1) | 134 return revision_match.group(1) |
| 134 return None | 135 return None |
| 135 | 136 |
| 136 def IsWindows(): | 137 def IsWindows(): |
| 137 return (sys.platform=='win32') | 138 return (sys.platform=='win32') |
| 138 | 139 |
| 139 if __name__ == '__main__': | 140 if __name__ == '__main__': |
| 140 main() | 141 main() |
| OLD | NEW |