All checks were successful
ci / pruefen (push) Successful in 3m11s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmHhg7bzeoxrPsLnJ4nor4
12 lines
594 B
Bash
Executable File
12 lines
594 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Erzwungenes Kommando des Deploy-Schlüssels (→ #1253): Der Runner darf per SSH genau eines, nämlich eine Version nennen.
|
|
# Liegt root-eigen unter /usr/local/sbin; der SSH-Zugang `nexus-deploy` kann es nicht ändern. Ruft per sudo nur
|
|
# nexus-deploy-install auf, das die Version noch einmal prüft.
|
|
set -euo pipefail
|
|
v="${SSH_ORIGINAL_COMMAND:-}"
|
|
if ! [[ "$v" =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(-rc[0-9]{1,3})?$ ]]; then
|
|
echo "Aufruf: genau eine Version, zum Beispiel 0.1.33 oder 0.1.33-rc3." >&2
|
|
exit 2
|
|
fi
|
|
exec sudo -n /usr/local/sbin/nexus-deploy-install "$v"
|