sign_mac_app.sh 1.0 KB

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # thanks to https://www.jviotti.com/2016/03/16/how-to-code-sign-os-x-electron-apps-in-travis-ci.html
  3. # for the helpful instructions
  4. # if [[ "$SHOULD_BUILD" == "yes" ]]; then
  5. # if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
  6. # if [ -d "VSCode-darwin" ]; then # just in case the build failed
  7. # cd VSCode-darwin
  8. # export CERTIFICATE_P12=VSCodium.p12
  9. # echo $CERTIFICATE_OSX_P12 | base64 --decode > $CERTIFICATE_P12
  10. # export KEYCHAIN=build.keychain
  11. # security create-keychain -p mysecretpassword $KEYCHAIN
  12. # security default-keychain -s $KEYCHAIN
  13. # security unlock-keychain -p mysecretpassword $KEYCHAIN
  14. # security import $CERTIFICATE_P12 -k $KEYCHAIN -P $CERTIFICATE_OSX_PASSWORD -T /usr/bin/codesign
  15. #
  16. # # https://docs.travis-ci.com/user/common-build-problems/
  17. # security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword $KEYCHAIN
  18. #
  19. # codesign --deep --force --verbose --sign "$CERTIFICATE_OSX_ID" VSCodium.app
  20. # fi
  21. # fi
  22. # fi