Files
renovate-test/renovate/script/forgejo-down.ps1
T

13 lines
573 B
PowerShell

# Stops the local Forgejo. With -Purge, the container, the data volume and .forgejo-token are deleted as well.
param([switch]$Purge)
podman stop renovate-forgejo 2>$null | Out-Null
if ($Purge) {
podman rm -f renovate-forgejo 2>$null | Out-Null
podman volume rm -f renovate-forgejo-data 2>$null | Out-Null
Remove-Item (Join-Path $PSScriptRoot '.forgejo-token') -ErrorAction SilentlyContinue
Write-Host 'Forgejo removed including all data' -ForegroundColor Cyan
} else {
Write-Host 'Forgejo stopped (data is kept; use -Purge to delete it)' -ForegroundColor Cyan
}