From 6903983fe929c1f2d085f150c4af9bd680690062 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Fri, 18 Aug 2017 07:18:27 +0000 Subject: [PATCH] Update horizon-reload.sh not to use run_tests.sh horizon master branch (for Queens) dropped run_tests.sh in favor of tox. compilemessages needs to be run in a different way. Also improves some logics: * Cleanup stale compiled python files * DJANGO_SETTINGS_MODULE=openstack_dashboard.settings is no longer needed as this is the default value of manage.py in the horizon repo Change-Id: If823e8e63c251dab0d764212eba2ec77774f789e --- checksite/horizon-reload.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/checksite/horizon-reload.sh b/checksite/horizon-reload.sh index 819529e..fb9943c 100644 --- a/checksite/horizon-reload.sh +++ b/checksite/horizon-reload.sh @@ -1,13 +1,20 @@ #!/bin/bash -# Target branch: master, stable/newton, ... -BRANCH=stable/newton +# Target branch: master, stable/pike, ... +BRANCH=stable/pike cd /opt/stack/horizon + +# Remove stale compiled python files +find horizon -name '*.pyc' | xargs rm +find openstack_dashboard -name '*.pyc' | xargs rm + +# Fetch the latest code from git git checkout $BRANCH git remote update origin git merge origin/$BRANCH -./run_tests.sh --compilemessages -N -DJANGO_SETTINGS_MODULE=openstack_dashboard.settings python manage.py collectstatic --noinput -DJANGO_SETTINGS_MODULE=openstack_dashboard.settings python manage.py compress --force + +python manage.py compilemessages +python manage.py collectstatic --noinput +python manage.py compress --force sudo service apache2 reload