merge dispatch and deploy into a single deploy.sh

deploy.sh reads SSH_ORIGINAL_COMMAND directly, validates it, and
runs the deploy. No more dispatch indirection.
This commit is contained in:
2026-03-13 17:08:19 -04:00
parent f1d4508411
commit c484109f1c
4 changed files with 14 additions and 16 deletions
-9
View File
@@ -1,9 +0,0 @@
#!/bin/bash
set -euo pipefail
if [[ "$SSH_ORIGINAL_COMMAND" =~ ^deploy-[a-zA-Z0-9._-]+$ ]]; then
sudo /opt/hantim/scripts/deploy.sh "$SSH_ORIGINAL_COMMAND"
else
echo "Unknown command: $SSH_ORIGINAL_COMMAND"
exit 1
fi
+9 -1
View File
@@ -1,6 +1,14 @@
#!/bin/bash
set -euo pipefail
APP="${1#deploy-}"
CMD="${SSH_ORIGINAL_COMMAND:-${1:-}}"
if ! [[ "$CMD" =~ ^deploy-[a-zA-Z0-9._-]+$ ]]; then
echo "Unknown command: $CMD"
exit 1
fi
APP="${CMD#deploy-}"
cd /opt/hantim
git pull
cd "docker/$APP"