| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 """Rolls third_party/boringssl/src in DEPS and updates generated build files.""" | 6 """Rolls third_party/boringssl/src in DEPS and updates generated build files.""" |
| 7 | 7 |
| 8 import os | 8 import os |
| 9 import os.path | 9 import os.path |
| 10 import shutil | 10 import shutil |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 if not os.path.isfile(DEPS_PATH) or not os.path.isdir(BORINGSSL_SRC_PATH): | 21 if not os.path.isfile(DEPS_PATH) or not os.path.isdir(BORINGSSL_SRC_PATH): |
| 22 raise Exception('Could not find Chromium checkout') | 22 raise Exception('Could not find Chromium checkout') |
| 23 | 23 |
| 24 # Pull OS_ARCH_COMBOS out of the BoringSSL script. | 24 # Pull OS_ARCH_COMBOS out of the BoringSSL script. |
| 25 sys.path.append(os.path.join(BORINGSSL_SRC_PATH, 'util')) | 25 sys.path.append(os.path.join(BORINGSSL_SRC_PATH, 'util')) |
| 26 import generate_build_files | 26 import generate_build_files |
| 27 | 27 |
| 28 GENERATED_FILES = [ | 28 GENERATED_FILES = [ |
| 29 'BUILD.generated.gni', | 29 'BUILD.generated.gni', |
| 30 'BUILD.generated_tests.gni', | 30 'BUILD.generated_tests.gni', |
| 31 'crypto_test_data.cc', |
| 31 'err_data.c', | 32 'err_data.c', |
| 32 ] | 33 ] |
| 33 | 34 |
| 34 | 35 |
| 35 def IsPristine(repo): | 36 def IsPristine(repo): |
| 36 """Returns True if a git checkout is pristine.""" | 37 """Returns True if a git checkout is pristine.""" |
| 37 cmd = ['git', 'diff', '--ignore-submodules'] | 38 cmd = ['git', 'diff', '--ignore-submodules'] |
| 38 return not (subprocess.check_output(cmd, cwd=repo).strip() or | 39 return not (subprocess.check_output(cmd, cwd=repo).strip() or |
| 39 subprocess.check_output(cmd + ['--cached'], cwd=repo).strip()) | 40 subprocess.check_output(cmd + ['--cached'], cwd=repo).strip()) |
| 40 | 41 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 116 |
| 116 BUG=none | 117 BUG=none |
| 117 """ % (head[:9], commit[:9], head, commit) | 118 """ % (head[:9], commit[:9], head, commit) |
| 118 subprocess.check_call(['git', 'commit', '-m', message], cwd=SRC_PATH) | 119 subprocess.check_call(['git', 'commit', '-m', message], cwd=SRC_PATH) |
| 119 | 120 |
| 120 return 0 | 121 return 0 |
| 121 | 122 |
| 122 | 123 |
| 123 if __name__ == '__main__': | 124 if __name__ == '__main__': |
| 124 sys.exit(main()) | 125 sys.exit(main()) |
| OLD | NEW |