hs.scripts/updates/taiga.sh
2024-04-25 13:49:12 +02:00

40 lines
982 B
Bash

#!/bin/bash
# WIP
set -e
taiga_back="$HOME/taiga-back"
taiga_front="$HOME/taiga-front-dist"
domain=/home/doms/$(ls $HOME/doms)
cd $taiga_back
git fetch
release=`git tag --sort=taggerdate | grep -E '[0-9]' | tail -1`
#current_release=`git describe --abbrev=0 --tags`
export DJANGO_SETTINGS_MODULE=settings.config
function pipupdate {
source .venv/bin/activate
pip install --upgrade pip wheel
pip install -r requirements.txt
}
function backupdate {
pipupdate
pip install git+https://github.com/kaleidos-ventures/taiga-contrib-protected.git@$release#egg=taiga-contrib-protected
python manage.py migrate --noinput
python manage.py compilemessages
python manage.py collectstatic --noinput
}
backupdate
cd $taiga_front
git pull
echo
echo ">>> Attempting to restart the application at $domain..."
echo ">>> If it is not detected try to properly load the environment"
echo ">>> Example: su - xyz00-anwendung"
echo
passenger-config restart-app $domain