13 lines
583 B
PowerShell
13 lines
583 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
|
|
}
|