(app, options)
| 752 | ]) |
| 753 | |
| 754 | def notarize_dmg(app, options): |
| 755 | username = options.notarization_username |
| 756 | password = options.notarization_password |
| 757 | team_id = options.notarization_itc_provider |
| 758 | if not username or not password: |
| 759 | log("You must provide a notarization username and password") |
| 760 | sys.exit(1) |
| 761 | |
| 762 | max_retries = 5 |
| 763 | attempt = 0 |
| 764 | |
| 765 | while attempt < max_retries: |
| 766 | try: |
| 767 | log(f"Notarization attempt {attempt + 1} of {max_retries}") |
| 768 | notarize(app, username, password, team_id) |
| 769 | log("Notarization succeeded") |
| 770 | break # Exit the loop if notarization is successful |
| 771 | except Exception as e: |
| 772 | log(f"Notarization failed on attempt {attempt + 1}: {e}") |
| 773 | attempt += 1 |
| 774 | if attempt >= max_retries: |
| 775 | log("Max retries reached. Notarization failed.") |
| 776 | sys.exit(1) |
| 777 | else: |
| 778 | log("Retrying notarization...") |
| 779 | |
| 780 | def build(options): |
| 781 | for platform in options.target_platform: |
no test coverage detected