| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 return 0 | 70 return 0 |
| 71 | 71 |
| 72 if len(sys.argv) > 1: | 72 if len(sys.argv) > 1: |
| 73 commit = RevParse(BORINGSSL_SRC_PATH, sys.argv[1]) | 73 commit = RevParse(BORINGSSL_SRC_PATH, sys.argv[1]) |
| 74 else: | 74 else: |
| 75 subprocess.check_call(['git', 'fetch', 'origin'], cwd=BORINGSSL_SRC_PATH) | 75 subprocess.check_call(['git', 'fetch', 'origin'], cwd=BORINGSSL_SRC_PATH) |
| 76 commit = RevParse(BORINGSSL_SRC_PATH, 'origin/master') | 76 commit = RevParse(BORINGSSL_SRC_PATH, 'origin/master') |
| 77 | 77 |
| 78 head = RevParse(BORINGSSL_SRC_PATH, 'HEAD') | 78 head = RevParse(BORINGSSL_SRC_PATH, 'HEAD') |
| 79 if head == commit: | 79 if head == commit: |
| 80 print 'BoringSSL already up-to-date.' | 80 print 'BoringSSL already up to date.' |
| 81 return 0 | 81 return 0 |
| 82 | 82 |
| 83 print 'Rolling BoringSSL from %s to %s...' % (head, commit) | 83 print 'Rolling BoringSSL from %s to %s...' % (head, commit) |
| 84 | 84 |
| 85 UpdateDEPS(DEPS_PATH, head, commit) | 85 UpdateDEPS(DEPS_PATH, head, commit) |
| 86 | 86 |
| 87 # Checkout third_party/boringssl/src to generate new files. | 87 # Checkout third_party/boringssl/src to generate new files. |
| 88 subprocess.check_call(['git', 'checkout', commit], cwd=BORINGSSL_SRC_PATH) | 88 subprocess.check_call(['git', 'checkout', commit], cwd=BORINGSSL_SRC_PATH) |
| 89 | 89 |
| 90 # Clear the old generated files. | 90 # Clear the old generated files. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 117 | 117 |
| 118 BUG=none | 118 BUG=none |
| 119 """ % (head[:9], commit[:9], head, commit) | 119 """ % (head[:9], commit[:9], head, commit) |
| 120 subprocess.check_call(['git', 'commit', '-m', message], cwd=SRC_PATH) | 120 subprocess.check_call(['git', 'commit', '-m', message], cwd=SRC_PATH) |
| 121 | 121 |
| 122 return 0 | 122 return 0 |
| 123 | 123 |
| 124 | 124 |
| 125 if __name__ == '__main__': | 125 if __name__ == '__main__': |
| 126 sys.exit(main()) | 126 sys.exit(main()) |
| OLD | NEW |