OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Entry point for both build and try bots. | 6 """Entry point for both build and try bots. |
7 | 7 |
8 This script is invoked from XXX, usually without arguments | 8 This script is invoked from XXX, usually without arguments |
9 to package an SDK. It automatically determines whether | 9 to package an SDK. It automatically determines whether |
10 this SDK is for mac, win, linux. | 10 this SDK is for mac, win, linux. |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 175 |
176 def BuildStepCopyTextFiles(pepperdir, pepper_ver, chrome_revision, | 176 def BuildStepCopyTextFiles(pepperdir, pepper_ver, chrome_revision, |
177 nacl_revision): | 177 nacl_revision): |
178 buildbot_common.BuildStep('Add Text Files') | 178 buildbot_common.BuildStep('Add Text Files') |
179 InstallFiles(SDK_SRC_DIR, pepperdir, TEXT_FILES) | 179 InstallFiles(SDK_SRC_DIR, pepperdir, TEXT_FILES) |
180 | 180 |
181 # Replace a few placeholders in README | 181 # Replace a few placeholders in README |
182 readme_text = open(os.path.join(SDK_SRC_DIR, 'README')).read() | 182 readme_text = open(os.path.join(SDK_SRC_DIR, 'README')).read() |
183 readme_text = readme_text.replace('${VERSION}', pepper_ver) | 183 readme_text = readme_text.replace('${VERSION}', pepper_ver) |
184 readme_text = readme_text.replace('${CHROME_REVISION}', chrome_revision) | 184 readme_text = readme_text.replace('${CHROME_REVISION}', chrome_revision) |
| 185 readme_text = readme_text.replace('${CHROME_COMMIT_POSITION}', |
| 186 build_version.ChromeCommitPosition()) |
185 readme_text = readme_text.replace('${NACL_REVISION}', nacl_revision) | 187 readme_text = readme_text.replace('${NACL_REVISION}', nacl_revision) |
186 | 188 |
187 # Year/Month/Day Hour:Minute:Second | 189 # Year/Month/Day Hour:Minute:Second |
188 time_format = '%Y/%m/%d %H:%M:%S' | 190 time_format = '%Y/%m/%d %H:%M:%S' |
189 readme_text = readme_text.replace('${DATE}', | 191 readme_text = readme_text.replace('${DATE}', |
190 datetime.datetime.now().strftime(time_format)) | 192 datetime.datetime.now().strftime(time_format)) |
191 | 193 |
192 open(os.path.join(pepperdir, 'README'), 'w').write(readme_text) | 194 open(os.path.join(pepperdir, 'README'), 'w').write(readme_text) |
193 | 195 |
194 | 196 |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 BuildStepArchiveSDKTools() | 1031 BuildStepArchiveSDKTools() |
1030 | 1032 |
1031 return 0 | 1033 return 0 |
1032 | 1034 |
1033 | 1035 |
1034 if __name__ == '__main__': | 1036 if __name__ == '__main__': |
1035 try: | 1037 try: |
1036 sys.exit(main(sys.argv)) | 1038 sys.exit(main(sys.argv)) |
1037 except KeyboardInterrupt: | 1039 except KeyboardInterrupt: |
1038 buildbot_common.ErrorExit('build_sdk: interrupted') | 1040 buildbot_common.ErrorExit('build_sdk: interrupted') |
OLD | NEW |