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 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 build_version.ChromeVersion(),) | 799 build_version.ChromeVersion(),) |
800 buildbot_common.Archive('sdk_tools.tgz', bucket_path, OUT_DIR, | 800 buildbot_common.Archive('sdk_tools.tgz', bucket_path, OUT_DIR, |
801 step_link=False) | 801 step_link=False) |
802 buildbot_common.Archive('nacl_sdk.zip', bucket_path, OUT_DIR, | 802 buildbot_common.Archive('nacl_sdk.zip', bucket_path, OUT_DIR, |
803 step_link=False) | 803 step_link=False) |
804 | 804 |
805 | 805 |
806 def BuildStepSyncNaClPorts(): | 806 def BuildStepSyncNaClPorts(): |
807 """Pull the pinned revision of naclports from SVN.""" | 807 """Pull the pinned revision of naclports from SVN.""" |
808 buildbot_common.BuildStep('Sync naclports') | 808 buildbot_common.BuildStep('Sync naclports') |
| 809 |
| 810 # In case a previous svn checkout exists, remove it. |
| 811 # TODO(sbc): remove this once all the build machines |
| 812 # have removed the old checkout |
| 813 if (os.path.exists(NACLPORTS_DIR) and |
| 814 not os.path.exists(os.path.join(NACLPORTS_DIR, '.git'))): |
| 815 buildbot_common.RemoveDir(NACLPORTS_DIR) |
| 816 |
809 if not os.path.exists(NACLPORTS_DIR): | 817 if not os.path.exists(NACLPORTS_DIR): |
810 # checkout new copy of naclports | 818 # checkout new copy of naclports |
811 cmd = ['git', 'clone', NACLPORTS_URL, 'naclports'] | 819 cmd = ['git', 'clone', NACLPORTS_URL, 'naclports'] |
812 buildbot_common.Run(cmd, cwd=os.path.dirname(NACLPORTS_DIR)) | 820 buildbot_common.Run(cmd, cwd=os.path.dirname(NACLPORTS_DIR)) |
813 else: | 821 else: |
814 # checkout new copy of naclports | 822 # checkout new copy of naclports |
815 buildbot_common.Run(['git', 'fetch'], cwd=NACLPORTS_DIR) | 823 buildbot_common.Run(['git', 'fetch'], cwd=NACLPORTS_DIR) |
816 | 824 |
817 # sync to required revision | 825 # sync to required revision |
818 cmd = ['git', 'checkout', str(NACLPORTS_REV)] | 826 cmd = ['git', 'checkout', str(NACLPORTS_REV)] |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 BuildStepArchiveSDKTools() | 1055 BuildStepArchiveSDKTools() |
1048 | 1056 |
1049 return 0 | 1057 return 0 |
1050 | 1058 |
1051 | 1059 |
1052 if __name__ == '__main__': | 1060 if __name__ == '__main__': |
1053 try: | 1061 try: |
1054 sys.exit(main(sys.argv)) | 1062 sys.exit(main(sys.argv)) |
1055 except KeyboardInterrupt: | 1063 except KeyboardInterrupt: |
1056 buildbot_common.ErrorExit('build_sdk: interrupted') | 1064 buildbot_common.ErrorExit('build_sdk: interrupted') |
OLD | NEW |