-
Notifications
You must be signed in to change notification settings - Fork 11
/
pack-push.ps1
31 lines (22 loc) · 1.04 KB
/
pack-push.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
param (
[string]$packageSource = "local-packages",
[string]$versionSuffix = "",
[string]$targetFrameworks = "netcoreapp3.1"
)
Write-Host "Running with versionSuffix '$($versionSuffix)'..."
$tempNupkgFolder = './nupkgs'
Write-Host "Checking if temp nupkgs folder '$($tempNupkgFolder)' exists..."
$tempNupkgFolderExists = Test-Path $tempNupkgFolder -PathType Container
if(!($tempNupkgFolderExists))
{
New-Item $tempNupkgFolder -ItemType Directory
}
Write-Host "Deleting temporary nupkgs..."
Get-ChildItem -Path $tempNupkgFolder -Include *.nupkg -File -Recurse | ForEach-Object { $_.Delete()}
Write-Host "Packing src packages..."
./pack-src.ps1 -targetFrameworks $targetFrameworks -versionSuffix $versionSuffix
./push.ps1 -packageSource $packageSource -packagePrefix "FakeXrmEasy.Core"
Write-Host "Packing test packages..."
./pack-tests.ps1 -targetFrameworks $targetFrameworks -versionSuffix $versionSuffix
./push.ps1 -packageSource $packageSource -packagePrefix "FakeXrmEasy.CoreTests"
Write-Host "Pack Succeeded :)" -ForegroundColor Green