aboutsummaryrefslogtreecommitdiff
path: root/unit-test.sh
diff options
context:
space:
mode:
authorKelley Spoon <kelley.spoon@linaro.org>2021-12-16 07:46:42 -0600
committerKelley Spoon <kelley.spoon@linaro.org>2021-12-18 03:21:26 +0000
commit35e8476b3bb1cf1ca4e8d690ba6ae63d530c848d (patch)
tree51165609b41a4c196a1e7e986403eb5a2daa74b0 /unit-test.sh
parent73dbed9ddbec37226fdf97e594107a0710c25c0f (diff)
staticfiles: get control of the static files once again
Fix staticfiles so that they are correctly generated by 'collectstatic' regardless of where or how this app is deployed. In this change, let's concentrate all static files in 'license_protected_downloads/static' so that we can clear out STATIC_ROOT ('static') and rebuild it reliably with 'collectstatic'. We also restore the contents of the 'license_protected_downloads/static' directory, and update the unit-test.sh script to call 'collectstatic' on a freshly installed STATIC_ROOT before it runs. Signed-off-by: Kelley Spoon <kelley.spoon@linaro.org> Change-Id: Ice720b4794a48540c3753f4a6efba027cbc29040 Reviewed-on: https://review.linaro.org/c/infrastructure/linaro-license-protection/+/40206
Diffstat (limited to 'unit-test.sh')
-rwxr-xr-xunit-test.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/unit-test.sh b/unit-test.sh
index f633587..da7073e 100755
--- a/unit-test.sh
+++ b/unit-test.sh
@@ -18,4 +18,7 @@ if [ -z $VIRTUAL_ENV ] ; then
pip install -r requirements.txt
fi
+rm -rf static/*
+
+DJANGO_SETTINGS_MODULE=settings SKIP_LINT=$SKIP_LINT ./manage.py collectstatic --no-input
DJANGO_SETTINGS_MODULE=settings SKIP_LINT=$SKIP_LINT ./manage.py test license_protected_downloads