read_codesign_pass 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ##############################################################################
  2. # Apple Developer credentials necessary:
  3. #
  4. # + Signing for distribution and notarization require an active Apple
  5. # Developer membership
  6. # + An Apple Development identity is needed for code signing
  7. # (i.e. 'Apple Development: YOUR APPLE ID (PROVIDER)')
  8. # + Your Apple developer ID is needed for notarization
  9. # + An app-specific password is necessary for notarization from CLI
  10. # + This password will be stored in your macOS keychain under the identifier
  11. # 'OBS-Codesign-Password'with access Apple's 'altool' only.
  12. ##############################################################################
  13. autoload -Uz read_codesign read_codesign_user log_info
  14. if (( ! ${+CODESIGN_IDENT} )) {
  15. read_codesign
  16. }
  17. if (( ! ${+CODESIGN_IDENT_USER} )) {
  18. read_codesign_user
  19. }
  20. log_info 'Setting up password for notarization keychain...'
  21. if (( ! ${+CODESIGN_IDENT_PASS} )) {
  22. read -s CODESIGN_IDENT_PASS'?Apple Developer ID password: '
  23. }
  24. print ''
  25. log_info 'Setting up notarization keychain...'
  26. log_warning "
  27. + Your Apple ID and an app-specific password is necessary for notarization from CLI
  28. + This password will be stored in your macOS keychain under the identifier
  29. 'OBS-Codesign-Password' with access Apple's 'altool' only.
  30. "
  31. xcrun notarytool store-credentials 'OBS-Codesign-Password' --apple-id "${CODESIGN_IDENT_USER}" --team-id "${CODESIGN_TEAM}" --password "${CODESIGN_IDENT_PASS}"