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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 buildbot_common.BuildStep('Generate manifest') | 686 buildbot_common.BuildStep('Generate manifest') |
687 with open(tarfile, 'rb') as tarfile_stream: | 687 with open(tarfile, 'rb') as tarfile_stream: |
688 archive_sha1, archive_size = manifest_util.DownloadAndComputeHash( | 688 archive_sha1, archive_size = manifest_util.DownloadAndComputeHash( |
689 tarfile_stream) | 689 tarfile_stream) |
690 archive = manifest_util.Archive(manifest_util.GetHostOS()) | 690 archive = manifest_util.Archive(manifest_util.GetHostOS()) |
691 archive.CopyFrom({'url': server.GetURL(tarname), | 691 archive.CopyFrom({'url': server.GetURL(tarname), |
692 'size': archive_size, | 692 'size': archive_size, |
693 'checksum': {'sha1': archive_sha1}}) | 693 'checksum': {'sha1': archive_sha1}}) |
694 bundle = manifest_util.Bundle('pepper_' + pepper_ver) | 694 bundle = manifest_util.Bundle('pepper_' + pepper_ver) |
695 bundle.CopyFrom({ | 695 bundle.CopyFrom({ |
696 'revision': clnumber, | 696 'revision': int(clnumber), |
697 'repath': 'pepper_' + pepper_ver, | 697 'repath': 'pepper_' + pepper_ver, |
698 'version': pepper_ver, | 698 'version': int(pepper_ver), |
699 'description': 'Chrome %s bundle, revision %s' % ( | 699 'description': 'Chrome %s bundle, revision %s' % ( |
700 pepper_ver, clnumber), | 700 pepper_ver, clnumber), |
701 'stability': 'dev', | 701 'stability': 'dev', |
702 'recommended': 'no', | 702 'recommended': 'no', |
703 'archives': [archive]}) | 703 'archives': [archive]}) |
704 manifest = manifest_util.SDKManifest() | 704 manifest = manifest_util.SDKManifest() |
705 manifest.SetBundle(bundle) | 705 manifest.SetBundle(bundle) |
706 manifest_name = 'naclsdk_manifest2.json' | 706 manifest_name = 'naclsdk_manifest2.json' |
707 with open(os.path.join(SERVER_DIR, manifest_name), 'wb') as \ | 707 with open(os.path.join(SERVER_DIR, manifest_name), 'wb') as \ |
708 manifest_stream: | 708 manifest_stream: |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 manifest_snippet_stream.write(bundle.GetDataAsString()) | 759 manifest_snippet_stream.write(bundle.GetDataAsString()) |
760 | 760 |
761 buildbot_common.Archive(tarname + '.json', bucket_path, OUT_DIR, | 761 buildbot_common.Archive(tarname + '.json', bucket_path, OUT_DIR, |
762 step_link=False) | 762 step_link=False) |
763 | 763 |
764 return 0 | 764 return 0 |
765 | 765 |
766 | 766 |
767 if __name__ == '__main__': | 767 if __name__ == '__main__': |
768 sys.exit(main(sys.argv)) | 768 sys.exit(main(sys.argv)) |
OLD | NEW |