mamweb/make/deploy

26 lines
489 B
Text
Raw Normal View History

2022-11-07 22:32:06 +01:00
#!/bin/bash
set -exuo pipefail
. make/lib.sh
if test "$USER" != "mam-web";
then
echo >&2 "Nasadit web smí jen uživatel mam-web"
exit 1
fi
if test "$(readlink -f .)" != "$TESTWEB";
then
echo >&2 "Nasadit testweb lze jen v jeho složce"
exit 1
fi
CURRENT_BRANCH="$(git branch --show-current)"
BRANCH="${1:-$CURRENT_BRANCH}"
safe_checkout_branch "$BRANCH" "$0"
# Teď máme správnou větev, jdeme vše nainstalovat
install_everything
systemctl --user restart mamweb-test.service