2
2
3
3
$executionRoot = Get-Location
4
4
$artifactsRoot = $executionRoot , ' artifacts' -join ' \'
5
- $binariesRoot = $executionRoot , ' artifacts' , ' binaries' -join ' \'
6
- $artifactsZipPath = $executionRoot , ' artifacts' , ' Release.zip' -join ' \'
7
5
$nugetRoot = $executionRoot , ' artifacts' , ' nuget' -join ' \'
8
- Get-ChildItem .\ - Include $binariesRoot - Recurse | ForEach-Object ($_ ) { Remove-Item $_.Fullname - Force - Recurse }
9
6
Get-ChildItem .\ - Include $nugetRoot - Recurse | ForEach-Object ($_ ) { Remove-Item $_.Fullname - Force - Recurse }
10
- New-Item - Path $binariesRoot - ItemType Directory - Force > $null
11
7
New-Item - Path $nugetRoot - ItemType Directory - Force > $null
12
8
$platforms = @ (' Forms' , ' Wpf' , ' Uno' , ' Maui' )
13
9
14
10
$core = @ (" Prism.Core" , " Prism.Events" , " Prism.dll" , " Prism.pdb" , " Prism.xml" )
15
11
$allowedExtensions = @ (' .dll' , ' .pdb' , ' .xml' , ' .pri' , ' .nupkg' , ' .snupkg' )
16
- $files = Get-ChildItem - Path $artifactsRoot - Filter " *" - Recurse | Where-Object { (Test-Path - Path $_.FullName - PathType Leaf) -and $_.FullName.StartsWith ($binariesRoot ) -eq $false -and $_ .FullName.StartsWith ( $ nugetRoot ) -eq $false -and ($allowedExtensions -contains [System.IO.Path ]::GetExtension($_.FullName )) }
12
+ $files = Get-ChildItem - Path $artifactsRoot - Filter " *" - Recurse | Where-Object { (Test-Path - Path $_.FullName - PathType Leaf) -and $_.FullName.StartsWith ($nugetRoot ) -eq $false -and ($allowedExtensions -contains [System.IO.Path ]::GetExtension($_.FullName )) }
17
13
18
14
if ($files.Count -eq 0 )
19
15
{
@@ -50,8 +46,6 @@ foreach($file in $files)
50
46
$parentDirName = Split-Path - Path (Split-Path - Path $file.FullName - Parent) - Leaf
51
47
52
48
Write-Output " Determining Copy Path for $parentDirName "
53
- $copyPath = Join-Path $binariesRoot - ChildPath $parentDirName
54
-
55
49
if ((Test-Path - Path $copyPath - PathType Container) -eq $false )
56
50
{
57
51
Write-Output " Creating $copyPath "
@@ -62,7 +56,4 @@ foreach($file in $files)
62
56
}
63
57
}
64
58
65
- Get-ChildItem $artifactsRoot | Where-Object { $_.Name -ne ' binaries' -and $_.Name -ne ' nuget' } | ForEach-Object { Remove-Item $_.FullName - Force - Recurse }
66
-
67
- Compress-Archive - Path $binariesRoot - DestinationPath $artifactsZipPath - Force
68
- Remove-Item - Path $binariesRoot - Recurse - Force
59
+ Get-ChildItem $artifactsRoot | Where-Object { $_.Name -ne ' nuget' } | ForEach-Object { Remove-Item $_.FullName - Force - Recurse }
0 commit comments