-
Notifications
You must be signed in to change notification settings - Fork 12
/
restore.ps1
35 lines (28 loc) · 1.48 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
35
param (
[string]$targetFrameworks = "netcoreapp3.1"
)
$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 "netcoreapp3.1")
{
./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" -targetFrameworks $targetFrameworks
./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