1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-07 09:20:04 +01:00
bitwarden-mobile/.github/scripts/ios/setup-keychain.ps1

14 lines
814 B
PowerShell
Raw Normal View History

2020-06-09 19:09:00 +02:00
$homePath = Resolve-Path "~" | Select-Object -ExpandProperty Path;
2020-06-09 17:48:11 +02:00
$secretsPath = $homePath + "/secrets"
2020-06-09 17:37:40 +02:00
2020-06-09 17:48:11 +02:00
$mobileKeyPath = $($secretsPath + "/bitwarden-mobile-key.p12");
$distCertPath = $($secretsPath + "/iphone-distribution-cert.p12");
2020-06-09 17:37:40 +02:00
security create-keychain -p $env:KEYCHAIN_PASSWORD build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p $env:KEYCHAIN_PASSWORD build.keychain
2020-06-10 02:47:46 +02:00
security set-keychain-settings -lut 1200 build.keychain
2020-06-10 02:36:44 +02:00
security import $mobileKeyPath -k build.keychain -P $env:MOBILE_KEY_PASSWORD -T /usr/bin/codesign -T /usr/bin/security
security import $distCertPath -k build.keychain -P $env:DIST_CERT_PASSWORD -T /usr/bin/codesign -T /usr/bin/security
2020-06-10 02:47:46 +02:00
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $env:KEYCHAIN_PASSWORD build.keychain