Kateryna Kostiuk | eee16cd | 2018-05-25 10:12:25 -0400 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | echo "" |
| 4 | cd build-local |
| 5 | macdeployqt ./Ring.app |
| 6 | echo "cloning certificates" |
| 7 | git clone $CERTIFICATES_REPOSITORY |
| 8 | echo "prepare keychain" |
| 9 | security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_NAME |
| 10 | security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_NAME |
| 11 | security list-keychains -s $KEYCHAIN_NAME |
| 12 | security set-key-partition-list -S apple-tool:,apple:,productbuild: -s -k $KEYCHAIN_PASSWORD $KEYCHAIN_NAME |
| 13 | echo "import certificates" |
| 14 | security import certificates/certificates/distribution/Certificates.p12 -k $KEYCHAIN_PATH -P $CERTIFICATES_PASSWORD -T /usr/bin/codesign -T /usr/bin/productbuild |
| 15 | DELIVER_PASSWORD=$APPLE_PASSWORD fastlane sigh --app_identifier $BUNDLE_ID --username $APPLE_ACCOUNT --readonly true --platform macos --team_id $TEAM_ID |
| 16 | security set-key-partition-list -S apple-tool:,apple:,productbuild: -s -k $KEYCHAIN_PASSWORD $KEYCHAIN_NAME |
| 17 | echo "start signing" |
| 18 | codesign --deep --force --verbose --sign "${APP_CERTIFICATE}" --entitlements ../data/Ring.entitlements Ring.app |
| 19 | codesign --verify --verbose Ring.app |
| 20 | echo "create .pkg" |
| 21 | productbuild --component Ring.app/ /Applications --sign "${INSTALLER_CERTIFICATE}" --product Ring.app/Contents/Info.plist Ring.pkg |
| 22 | pkgutil --check-signature Ring.pkg |
| 23 | /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool --validate-app --type osx -f Ring.pkg -u $APPLE_ACCOUNT --password $APPLE_PASSWORD |
| 24 | echo "start deploying" |
| 25 | /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool --upload-app --type osx -f Ring.pkg -u $APPLE_ACCOUNT --password $APPLE_PASSWORD |