22
33$executionRoot = Get-Location
44$artifactsRoot = $executionRoot , ' artifacts' -join ' \'
5- $binariesRoot = $executionRoot , ' artifacts' , ' binaries' -join ' \'
6- $artifactsZipPath = $executionRoot , ' artifacts' , ' Release.zip' -join ' \'
75$nugetRoot = $executionRoot , ' artifacts' , ' nuget' -join ' \'
8- Get-ChildItem .\ - Include $binariesRoot - Recurse | ForEach-Object ($_ ) { Remove-Item $_.Fullname - Force - Recurse }
96Get-ChildItem .\ - Include $nugetRoot - Recurse | ForEach-Object ($_ ) { Remove-Item $_.Fullname - Force - Recurse }
10- New-Item - Path $binariesRoot - ItemType Directory - Force > $null
117New-Item - Path $nugetRoot - ItemType Directory - Force > $null
128$platforms = @ (' Forms' , ' Wpf' , ' Uno' , ' Maui' )
139
1410$core = @ (" Prism.Core" , " Prism.Events" , " Prism.dll" , " Prism.pdb" , " Prism.xml" )
1511$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 )) }
1713
1814if ($files.Count -eq 0 )
1915{
@@ -50,8 +46,6 @@ foreach($file in $files)
5046 $parentDirName = Split-Path - Path (Split-Path - Path $file.FullName - Parent) - Leaf
5147
5248 Write-Output " Determining Copy Path for $parentDirName "
53- $copyPath = Join-Path $binariesRoot - ChildPath $parentDirName
54-
5549 if ((Test-Path - Path $copyPath - PathType Container) -eq $false )
5650 {
5751 Write-Output " Creating $copyPath "
@@ -62,7 +56,4 @@ foreach($file in $files)
6256 }
6357}
6458
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