Files
htl-reverse-proxy-tls-lab/scripts/workshop.ps1
T
hkoeck 4da7890119 Vereinheitliche Stack-Steuerung auf scripts/lab.sh
Eine einzige Quelle der Wahrheit fuer alle Stack-Aktionen statt
doppelt gepflegter Verb-Tabellen in Makefile und PowerShell-Wrapper.

- scripts/lab.sh: zentraler Dispatcher (bootstrap/up/redeploy/
  proxy-reload/down/logs/reset/reset-hard/reset-origin)
- workshop.ps1: switch-Tabelle kollabiert zu Delegation an lab.sh
  (kein --remove-orphans-Drift mehr zwischen den Oberflaechen)
- Makefile entfernt: WSL/Ubuntu bringt make nicht standardmaessig
  mit, Doku-Verben (make X) passten nicht zur PowerShell-Mehrheit
- bootstrap.sh: Logik inline, redundante bootstrap-unix.sh und
  bootstrap-wsl.sh entfernt
- Doku/HTML: alle 32 "make X" -> "./scripts/lab.sh X", Prosa
  (macOS-make-Hinweis, PowerShell-Wrapper-Text) angepasst

Verifiziert: bootstrap -> proxy-reload -> redeploy -> reset laufen
end-to-end gegen den Stack, Basisrouten und Done-Checks gruen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:30:16 +02:00

36 lines
885 B
PowerShell

param(
[ValidateSet("bootstrap", "up", "redeploy", "proxy-reload", "down", "logs", "reset", "reset-hard", "reset-origin")]
[string]$Action = "bootstrap",
[string]$Distro = ""
)
if (-not (Get-Command wsl.exe -ErrorAction SilentlyContinue)) {
Write-Error "WSL wurde nicht gefunden. Bitte WSL installieren und konfigurieren."
exit 1
}
$repoWinPath = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
$repoWslPath = (& wsl.exe wslpath -a "$repoWinPath").Trim()
if (-not $repoWslPath) {
Write-Error "Konnte den WSL Pfad fuer das Repo nicht ermitteln."
exit 1
}
$linuxCommand = "./scripts/lab.sh $Action"
$wslArgs = @()
if ($Distro) {
$wslArgs += "-d"
$wslArgs += $Distro
}
$wslArgs += "-e"
$wslArgs += "bash"
$wslArgs += "-lc"
$wslArgs += "cd '$repoWslPath' && $linuxCommand"
Write-Host "[info] Running in WSL: $linuxCommand"
& wsl.exe @wslArgs
exit $LASTEXITCODE