zulip/tools/update-prod-static
Zev Benjamin 614b5396a6 Collect static files directly in the location that will be served
We exclude the original source files for minified files by using a
custom Finder.

(imported from commit a6a25eb6146da53167b71c6d1c44588f75966059)
2013-06-12 17:46:38 -04:00

20 lines
507 B
Bash
Executable File

#!/bin/bash -e
# Update static files in production.
cd "$(dirname "$0")"/..
# Redirect output to a log file (most recent run only)
exec >update-prod-static.log
# Compile Handlebars templates
./tools/node node_modules/.bin/handlebars zephyr/static/templates/*.handlebars \
--output ./zephyr/static/templates/compiled.js \
--known if,unless,each,with
# Collect the files that we're going to serve
rm -rf prod-static/source-map
mkdir -p prod-static/source-map
./manage.py collectstatic --noinput