OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium OS 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 import datetime | 6 import datetime |
7 import multiprocessing | 7 import multiprocessing |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import re | 10 import re |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 uploaded. | 162 uploaded. |
163 retries: The number of times to retry before giving up, default: 5 | 163 retries: The number of times to retry before giving up, default: 5 |
164 key: The variable key to update in the git file. | 164 key: The variable key to update in the git file. |
165 (Default: PORTAGE_BINHOST) | 165 (Default: PORTAGE_BINHOST) |
166 """ | 166 """ |
167 prebuilt_branch = 'prebuilt_branch' | 167 prebuilt_branch = 'prebuilt_branch' |
168 old_cwd = os.getcwd() | 168 old_cwd = os.getcwd() |
169 os.chdir(os.path.dirname(filename)) | 169 os.chdir(os.path.dirname(filename)) |
170 | 170 |
171 commit = cros_build_lib.RunCommand(['git', 'rev-parse', 'HEAD'], | 171 commit = cros_build_lib.RunCommand(['git', 'rev-parse', 'HEAD'], |
172 redirect_stdout=True).output | 172 redirect_stdout=True).output.rstrip() |
173 cros_build_lib.RunCommand(['git', 'remote', 'update']) | 173 cros_build_lib.RunCommand(['git', 'remote', 'update']) |
174 cros_build_lib.RunCommand(['repo', 'start', prebuilt_branch, '.']) | 174 cros_build_lib.RunCommand(['repo', 'start', prebuilt_branch, '.']) |
175 git_ssh_config_cmd = [ | 175 git_ssh_config_cmd = [ |
176 'git', | 176 'git', |
177 'config', | 177 'config', |
178 'url.ssh://git@gitrw.chromium.org:9222.pushinsteadof', | 178 'url.ssh://git@gitrw.chromium.org:9222.pushinsteadof', |
179 'http://git.chromium.org/git' ] | 179 'http://git.chromium.org/git' ] |
180 cros_build_lib.RunCommand(git_ssh_config_cmd) | 180 cros_build_lib.RunCommand(git_ssh_config_cmd) |
181 description = 'Update %s="%s" in %s' % (key, value, filename) | 181 description = 'Update %s="%s" in %s' % (key, value, filename) |
182 print description | 182 print description |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 options.git_sync, options.sync_binhost_conf) | 730 options.git_sync, options.sync_binhost_conf) |
731 | 731 |
732 if options.board: | 732 if options.board: |
733 uploader._SyncBoardPrebuilts(options.board, options.build_path, version, | 733 uploader._SyncBoardPrebuilts(options.board, options.build_path, version, |
734 options.key, options.git_sync, | 734 options.key, options.git_sync, |
735 options.sync_binhost_conf, | 735 options.sync_binhost_conf, |
736 options.upload_board_tarball) | 736 options.upload_board_tarball) |
737 | 737 |
738 if __name__ == '__main__': | 738 if __name__ == '__main__': |
739 main() | 739 main() |
OLD | NEW |