mirror of
https://github.com/sinbad/UEScripts.git
synced 2025-02-23 05:05:24 +00:00
Add exclusions to 7z command
This commit is contained in:
parent
c39b450f86
commit
87e703ab95
@ -165,6 +165,8 @@ try {
|
||||
# Zip parent of the uplugin folder
|
||||
$zipsrc = (Get-Item $pluginfile).Directory.FullName
|
||||
$zipdst = Join-Path $config.OutputDir "$($pluginName)_$($versionNumber).zip"
|
||||
$excludefilename = "packageexclusions.txt"
|
||||
$excludefile = Join-Path $zipsrc $excludefilename
|
||||
|
||||
New-Item -ItemType Directory -Path $config.OutputDir -Force > $null
|
||||
Write-Output "Compressing to $zipdst"
|
||||
@ -172,6 +174,18 @@ try {
|
||||
$argList = [System.Collections.ArrayList]@()
|
||||
$argList.Add("a") > $null
|
||||
$argList.Add($zipdst) > $null
|
||||
# Standard exclusions
|
||||
$argList.Add("-x!$pluginName\.git\") > $null
|
||||
$argList.Add("-x!$pluginName\.git*") > $null
|
||||
$argList.Add("-x!$pluginName\Binaries\") > $null
|
||||
$argList.Add("-x!$pluginName\Intermediate\") > $null
|
||||
$argList.Add("-x!$pluginName\pluginconfig.json") > $null
|
||||
|
||||
if (Test-Path $excludefile) {
|
||||
$argList.Add("-x@`"$excludefile`"") > $null
|
||||
$argList.Add("-x!$pluginName\$excludefilename") > $null
|
||||
}
|
||||
|
||||
$argList.Add($zipsrc) > $null
|
||||
|
||||
if ($dryrun) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user