TODO ergänzt mit meldungen von coala.io

scripte nach bin/ verschoben
This commit is contained in:
2017-09-08 07:51:07 +02:00
parent 6e2240ed5f
commit ec8761b868
12 changed files with 3467 additions and 262 deletions

27
bin/cleanup.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
source .virtualenv/bin/activate
echo "aktualisiere Übersetzungen..."
cd src
unset DJANGO_SETTINGS_MODULE
for dir in *
do
if [ -d ${dir}/locale ]
echo "Übersetze $dir"
then
echo -n "$dir: "
cd ${dir}
django-admin.py makemessages -l de
cd ..
fi
done
sleep 5s
export DJANGO_SETTINGS_MODULE="kasu.settings.production"
./manage.py compilemessages
echo "lösche den Python Compiler Cache..."
find . -name "*.pyc" -exec rm -rf {} \;
echo "Aktualisiere Statics"
./manage.py collectstatic --noinput -c
echo "Erstelle Vorschaubilder"
./manage.py generateimages
touch kasu/wsgi.py

23
bin/sync.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
SSH_LOGIN="kasu@s21.wservices.ch"
SYNC_ASSESTS="requirements"
SYNC_SOURCECODE="src"
EXCLUDE_FILES="*.pyc"
grunt
echo "Syncing project assets ..."
rsync -r --copy-links --delete ${SYNC_ASSESTS} ${SSH_LOGIN}:~/
echo "Installing dependecies"
ssh ${SSH_LOGIN} "virtualenv/bin/pip install --upgrade -r requirements/base.txt"
echo "Syncing Sourcecode ..."
find . -name "*.pyc" -exec rm -rf {} \;
rsync -r --copy-links --delete ${SYNC_SOURCECODE} ${SSH_LOGIN}:~/ --exclude 'src/kasu/local_settings.py'
echo "Rebuild and reload django..."
ssh ${SSH_LOGIN} "rm src/kasu/settings/development.*"
ssh ${SSH_LOGIN} "virtualenv/bin/python ~/src/manage.py collectstatic -l --noinput -v1"
ssh ${SSH_LOGIN} "~/init/kasu restart"

6
bin/testserver.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
export DJANGO_SETTINGS_MODULE=kasu.settings
source .virtualenv/bin/activate
./manage.py runserver 0.0.0.0:8000