blob: c45b4ca7d9a5d22b6d153dde2f425d58bddd88be [file] [log] [blame]
Kateryna Kostiukeee16cd2018-05-25 10:12:25 -04001#!/bin/bash
2
3echo ""
4cd build-local
Kateryna Kostiukeee16cd2018-05-25 10:12:25 -04005echo "cloning certificates"
6git clone $CERTIFICATES_REPOSITORY
7echo "prepare keychain"
Kateryna Kostiukd1dcfa92018-05-29 10:38:12 -04008security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_NAME > /dev/null 2>&1
9security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_NAME > /dev/null 2>&1
10security list-keychains -s $KEYCHAIN_NAME > /dev/null 2>&1
11security set-key-partition-list -S apple-tool:,apple:,productbuild: -s -k $KEYCHAIN_PASSWORD $KEYCHAIN_NAME > /dev/null 2>&1
Kateryna Kostiukeee16cd2018-05-25 10:12:25 -040012echo "import certificates"
13security import certificates/certificates/distribution/Certificates.p12 -k $KEYCHAIN_PATH -P $CERTIFICATES_PASSWORD -T /usr/bin/codesign -T /usr/bin/productbuild
14DELIVER_PASSWORD=$APPLE_PASSWORD fastlane sigh --app_identifier $BUNDLE_ID --username $APPLE_ACCOUNT --readonly true --platform macos --team_id $TEAM_ID
Kateryna Kostiukd1dcfa92018-05-29 10:38:12 -040015security set-key-partition-list -S apple-tool:,apple:,productbuild: -s -k $KEYCHAIN_PASSWORD $KEYCHAIN_NAME > /dev/null 2>&1
Kateryna Kostiukeee16cd2018-05-25 10:12:25 -040016echo "start signing"
Kateryna Kostiukd1dcfa92018-05-29 10:38:12 -040017macdeployqt ./Ring.app -codesign="${APP_CERTIFICATE}"
18codesign --force --sign "${APP_CERTIFICATE}" --entitlements ../data/Ring.entitlements Ring.app
19codesign --verify Ring.app
Kateryna Kostiukeee16cd2018-05-25 10:12:25 -040020echo "create .pkg"
21productbuild --component Ring.app/ /Applications --sign "${INSTALLER_CERTIFICATE}" --product Ring.app/Contents/Info.plist Ring.pkg
Kateryna Kostiukeee16cd2018-05-25 10:12:25 -040022/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
23echo "start deploying"
24/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