added logic to get version from previous step

This commit is contained in:
Andrew Welker
2020-03-17 14:16:30 -06:00
parent c80aa71208
commit bba2838936
2 changed files with 18 additions and 8 deletions

View File

@@ -2,22 +2,22 @@ $destination = "$($Env:GITHUB_WORKSPACE)\output"
New-Item -ItemType Directory -Force -Path ($destination)
Get-ChildItem ($destination)
$exclusions = @(git submodule foreach --quiet 'echo $name')
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include @("*.clz", "*.cpz", "*.cplz") | ForEach-Object{
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include @("*.clz", "*.cpz", "*.cplz") | ForEach-Object {
$allowed = $true;
foreach($exclude in $exclusions) {
if((Split-Path $_.FullName -Parent).contains("$($exclude)")) {
foreach ($exclude in $exclusions) {
if ((Split-Path $_.FullName -Parent).contains("$($exclude)")) {
$allowed = $false;
break;
}
}
if($allowed) {
}
if ($allowed) {
Write-Host "allowing $($_)"
$_;
}
} | Copy-Item -Destination ($destination)
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) {
$filenames = @($_ -replace "cpz|clz|cplz", "dll", $_ -replace "cpz|clz|cplz", "xml")
if ($filenames.length -gt 0) {
Get-ChildItem -Recurse -Path "$($Env:GITHUB_WORKSPACE)" -include $filenames | Copy-Item -Destination ($destination)
}
}