From 766b4f797184f2d16e659b9050bff2fdea9ada08 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 9 Jun 2020 12:35:39 -0400 Subject: [PATCH] create profiles dir path if it doesnt exist --- .github/scripts/ios/setup-profiles.ps1 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/scripts/ios/setup-profiles.ps1 b/.github/scripts/ios/setup-profiles.ps1 index 3e602bf87..7168e31af 100644 --- a/.github/scripts/ios/setup-profiles.ps1 +++ b/.github/scripts/ios/setup-profiles.ps1 @@ -4,15 +4,18 @@ $secretsPath = $homePath + "/secrets" $autofillProfilePath = $($secretsPath + "/dist_autofill.mobileprovision"); $bitwardenProfilePath = $($secretsPath + "/dist_bitwarden.mobileprovision"); $extensionProfilePath = $($secretsPath + "/dist_extension.mobileprovision"); +$profilesDirPath = "~/Library/MobileDevice/Provisioning Profiles" + +if (!(Test-Path -Path $profilesDirPath)) +{ + New-Item -ItemType Directory -Path $profilesDirPath +} $autofill_uuid = grep UUID -A1 -a $autofillProfilePath | grep -io "[-A-F0-9]\{36\}" -Copy-Item $autofillProfilePath ` - -destination "~/Library/MobileDevice/Provisioning Profiles/$autofill_uuid.mobileprovision" +Copy-Item $autofillProfilePath -destination "$profilesDirPath/$autofill_uuid.mobileprovision" $bitwarden_uuid = grep UUID -A1 -a $bitwardenProfilePath | grep -io "[-A-F0-9]\{36\}" -Copy-Item $bitwardenProfilePath ` - -destination "~/Library/MobileDevice/Provisioning Profiles/$bitwarden_uuid.mobileprovision" +Copy-Item $bitwardenProfilePath -destination "$profilesDirPath/$bitwarden_uuid.mobileprovision" $extension_uuid = grep UUID -A1 -a $extensionProfilePath | grep -io "[-A-F0-9]\{36\}" -Copy-Item $extensionProfilePath ` - -destination "~/Library/MobileDevice/Provisioning Profiles/$extension_uuid.mobileprovision" +Copy-Item $extensionProfilePath -destination "$profilesDirPath/$extension_uuid.mobileprovision"