23 lines
765 B
PowerShell
23 lines
765 B
PowerShell
param(
|
|
[string]$Version = "0.4.3"
|
|
)
|
|
|
|
$Root = Split-Path -Parent $PSScriptRoot
|
|
$Release = Join-Path $Root "release"
|
|
$Output = Join-Path $Release "devx-rp-server-v$Version.zip"
|
|
$Staging = Join-Path $env:TEMP "devx-rp-release-$Version"
|
|
|
|
if (Test-Path $Staging) { Remove-Item $Staging -Recurse -Force }
|
|
New-Item $Staging -ItemType Directory | Out-Null
|
|
New-Item $Release -ItemType Directory -Force | Out-Null
|
|
|
|
Copy-Item (Join-Path $Root "server.cfg") $Staging
|
|
Copy-Item (Join-Path $Root "sql") $Staging -Recurse
|
|
Copy-Item (Join-Path $Root "resources") $Staging -Recurse
|
|
|
|
if (Test-Path $Output) { Remove-Item $Output -Force }
|
|
Compress-Archive -Path (Join-Path $Staging "*") -DestinationPath $Output
|
|
|
|
Remove-Item $Staging -Recurse -Force
|
|
Write-Host "Created: $Output"
|