Skip to content

Commit

Permalink
fix(local-build): properly exclude items
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Sep 16, 2023
1 parent 04c3a96 commit 8318c4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/playbook/local-build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ try {
}

if ($7zPath) {
(Get-ChildItem -Recurse -File | Where-Object { $excludeFiles -notcontains $_.Name }).FullName `
(Get-ChildItem -File -Exclude $excludeFiles -Recurse).FullName `
| Resolve-Path -Relative | ForEach-Object {$_.Substring(2)} | Out-File "$rootTemp\7zFiles.txt" -Encoding utf8

& $7zPath a -spf -y -mx1 -tzip "$apbxPath" `@"$rootTemp\7zFiles.txt" | Out-Null
Expand All @@ -190,7 +190,7 @@ try {
& $7zPath u "$apbxPath" * | Out-Null
Pop-Location
} else {
$filteredItems += (Get-ChildItem | Where-Object { $excludeFiles -notcontains $_.Name }).FullName + "$tempPlaybookConf"
$filteredItems += (Get-ChildItem -File -Exclude $excludeFiles -Recurse).FullName + "$tempPlaybookConf"
if (Test-Path $tempStartYML) { $filteredItems = $filteredItems + "$tempStartYML" }

Compress-Archive -Path $filteredItems -DestinationPath $zipFileName
Expand Down

0 comments on commit 8318c4c

Please sign in to comment.