Skip to content

Commit

Permalink
Fixed build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mystfit committed Jul 5, 2023
1 parent f39f750 commit 8a02d67
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 6 additions & 6 deletions BuildFrozenPlugin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions FrozenPluginBlacklistPaths.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
./StableDiffusionTools/Intermediate
./.git
Intermediate*
.gitattributes
.gitignore
.git

0 comments on commit 8a02d67

Please sign in to comment.