added logic to get dll & xml files

This commit is contained in:
Andrew Welker
2020-03-16 16:49:53 -06:00
parent 67850f58d7
commit 2bed6325ed

View File

@@ -2,13 +2,10 @@ $destination = "$($Env:GITHUB_WORKSPACE)\output"
New-Item -ItemType Directory -Force -Path ($destination)
Get-ChildItem ($destination)
$exclusions = @(git submodule foreach --quiet 'echo $name')
Write-Output "Exclusions $($exclusions)"
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include @("*.clz", "*.cpz", "*.cplz") | ForEach-Object{
Write-Host "checking $($_)"
$allowed = $true;
foreach($exclude in $exclusions) {
if((Split-Path $_.FullName -Parent).contains("$($exclude)")) {
Write-Host "excluding $($_)"
$allowed = $false;
break;
}
@@ -18,7 +15,12 @@ Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include @("*.clz", "*.c
$_;
}
} | Copy-Item -Destination ($destination)
Get-ChildItem "$($Env:GITHUB_WORKSPACE)\output"]
Get-ChildItem "$($Env:GITHUB_WORKSPACE)\output" include @("*.cpz", "*.clz", "*.cplz") | ForEach-Object {
$filenames = @($_ -replace "cpz|clz|cplz","dll",$_ -replace "cpz|clz|cplz","xml")
if($filenames.length > 0) {
Get-ChildItem -Recurse -Path "$($Env:GITHUB_WORKSPACE)" -include $filenames | Copy-Item -Destination ($destination)
}
}
$version = $Env
Compress-Archive -Path "$($Env:GITHUB_WORKSPACE)\output\*" -DestinationPath "$($Env:GITHUB_WORKSPACE)\$($Env:SOLUTION_FILE)-$($Env:VERSION).zip"
Get-ChildItem "$($Env:GITHUB_WORKSPACE)\"