Files
LevelCraft/deploy.ps1
SimolZimol 9cbd605b3d modified: build.gradle
new file:   deploy.ps1
	new file:   quick-deploy.ps1
2025-10-09 18:30:19 +02:00

29 lines
958 B
PowerShell

# LevelCraft Plugin Deploy Script
param(
[switch]$UsePassword,
[string]$Password = $null
)
Write-Host "LevelCraft Plugin Deployment" -ForegroundColor Green
Write-Host "="*40 -ForegroundColor Green
if ($UsePassword) {
if (!$Password) {
$SecurePassword = Read-Host "Server Password" -AsSecureString
$Password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecurePassword))
}
Write-Host "Using password authentication..." -ForegroundColor Yellow
$env:SERVER_PASSWORD = $Password
./gradlew uploadPlugin
Remove-Item Env:SERVER_PASSWORD -ErrorAction SilentlyContinue
} else {
Write-Host "Using SSH key authentication..." -ForegroundColor Yellow
./gradlew uploadPlugin
}
if ($LASTEXITCODE -eq 0) {
Write-Host "`nDeployment successful! ✅" -ForegroundColor Green
} else {
Write-Host "`nDeployment failed! ❌" -ForegroundColor Red
}