forked from DynamicsValue/fake-xrm-easy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
restore.ps1
34 lines (27 loc) · 1.37 KB
/
restore.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
param (
[string]$targetFrameworks = "net6.0"
)
$localPackageRestoreFolder = './packages'
Write-Host "Checking if local packages folder '$($localPackageRestoreFolder)' exists..."
$packageRestoreFolderExists = Test-Path $localPackageRestoreFolder -PathType leaf
if(!($packageRestoreFolderExists))
{
New-Item $localPackageRestoreFolder -ItemType Directory
}
Write-Host "Deleting previous installed packages in '$($localPackageRestoreFolder)'..."
Remove-Item -Recurse -Force $localPackageRestoreFolder
Write-Host "Restoring packages..."
if($targetFrameworks -eq "net6.0")
{
./restore-configuration.ps1 -configuration "FAKE_XRM_EASY_365" -targetFrameworks $targetFrameworks
./restore-configuration.ps1 -configuration "FAKE_XRM_EASY_9" -targetFrameworks $targetFrameworks
}
else
{
./restore-configuration.ps1 -configuration "FAKE_XRM_EASY_2013" -targetFrameworks $targetFrameworks
./restore-configuration.ps1 -configuration "FAKE_XRM_EASY_2015" -targetFrameworks $targetFrameworks
./restore-configuration.ps1 -configuration "FAKE_XRM_EASY_2016" -targetFrameworks $targetFrameworks
./restore-configuration.ps1 -configuration "FAKE_XRM_EASY_365" -targetFrameworks $targetFrameworks
./restore-configuration.ps1 -configuration "FAKE_XRM_EASY_9" -targetFrameworks $targetFrameworks
}
Write-Host "Done. It's convenient to restart vscode after this." -ForegroundColor Green