From 8a02d6740eda2900269063d1fc07c812b083cdc1 Mon Sep 17 00:00:00 2001 From: Byron Mallett Date: Thu, 6 Jul 2023 00:55:58 +1200 Subject: [PATCH] Fixed build scripts --- BuildFrozenPlugin.ps1 | 12 ++++++------ FrozenPluginBlacklistPaths.txt | 6 ++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/BuildFrozenPlugin.ps1 b/BuildFrozenPlugin.ps1 index f7f5197..f042dad 100644 --- a/BuildFrozenPlugin.ps1 +++ b/BuildFrozenPlugin.ps1 @@ -6,9 +6,6 @@ param( [string]$IgnorePathsFile ) -# Get the name of the top level directory -$rootName = Get-ChildItem -Path $InputFolder -Directory | select Name - # Read the ignore paths from the file $ignorePaths = Get-Content -Path $IgnorePathsFile @@ -27,10 +24,13 @@ $zipFileName = "{0}-{1}.zip" -f $InputFolder, $versionNumber # Create a temporary folder for the contents to be zipped $tempFolder = Join-Path -Path $env:TEMP -ChildPath ([System.Guid]::NewGuid().ToString()) -$tempFolderRoot = Join-Path -Path $tempFolder -ChildPath $rootName -# Copy the contents of the input folder to the temporary folder, excluding the specified paths -Copy-Item -Path $InputFolder -Destination $tempFolderRoot -Recurse -Exclude $ignorePaths +# Create a new root folder within the temporary folder +$rootFolder = Join-Path -Path $tempFolder -ChildPath (Split-Path -Leaf $InputFolder) +New-Item -ItemType Directory -Path $rootFolder | Out-Null + +# Copy the contents of the input folder to the root folder, excluding the specified paths +Copy-Item -Path $InputFolder\* -Destination $rootFolder -Recurse -Exclude $ignorePaths # Compress the contents of the temporary folder to a zip file Compress-Archive -Path $tempFolder\* -DestinationPath $zipFileName -CompressionLevel Optimal -Force diff --git a/FrozenPluginBlacklistPaths.txt b/FrozenPluginBlacklistPaths.txt index a42c19d..d4f973d 100644 --- a/FrozenPluginBlacklistPaths.txt +++ b/FrozenPluginBlacklistPaths.txt @@ -1,2 +1,4 @@ -./StableDiffusionTools/Intermediate -./.git \ No newline at end of file +Intermediate* +.gitattributes +.gitignore +.git \ No newline at end of file