forked from marcomilon/ezphp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateRelease.ps1
More file actions
executable file
·27 lines (21 loc) · 1.07 KB
/
Copy pathcreateRelease.ps1
File metadata and controls
executable file
·27 lines (21 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Get the current directory
$currentDir = Get-Location
# Create the Release directory
New-Item -ItemType Directory -Force -Path "$currentDir\Release"
# Copy files and directories to the Release directory
Copy-Item -Path "public_html" -Destination "$currentDir\Release\public_html" -Recurse -Force
Copy-Item -Path "LauncherBackground.exe" -Destination "$currentDir\Release\" -Force
Copy-Item -Path "s2hWrapper.exe" -Destination "$currentDir\Release\" -Force
Copy-Item -Path "launcher.bat" -Destination "$currentDir\Release\" -Force
Copy-Item -Path "stops2hWs.bat" -Destination "$currentDir\Release\" -Force
# Define the path for the ZIP file in the current directory
$zipPath = "$currentDir\Release.zip"
# Remove the ZIP file if it already exists
if (Test-Path $zipPath) {
Remove-Item $zipPath -Force
}
# Create the ZIP file
Add-Type -AssemblyName "System.IO.Compression.FileSystem"
[System.IO.Compression.ZipFile]::CreateFromDirectory("$currentDir\Release", $zipPath)
# Output success message
Write-Output "Release folder successfully zipped to $zipPath"