hass-core/script/build_frontend

22 lines
688 B
Text
Raw Normal View History

2015-02-22 17:33:01 -08:00
# Builds the frontend for production
2015-02-08 23:33:19 -08:00
cd "$(dirname "$0")/.."
2015-01-17 14:32:33 -08:00
cd homeassistant/components/frontend/www_static/home-assistant-polymer
npm run frontend_prod
2015-02-05 22:36:23 -08:00
cp bower_components/webcomponentsjs/webcomponents-lite.min.js ..
cp build/frontend.html ..
2015-12-07 23:43:28 -08:00
cp build/service_worker.js ..
2014-11-12 00:36:20 -08:00
# Generate the MD5 hash of the new frontend
cd ../..
echo '"""DO NOT MODIFY. Auto-generated by build_frontend script."""' > version.py
if [ $(command -v md5) ]; then
2015-01-30 08:26:06 -08:00
echo 'VERSION = "'`md5 -q www_static/frontend.html`'"' >> version.py
elif [ $(command -v md5sum) ]; then
2015-01-30 08:26:06 -08:00
echo 'VERSION = "'`md5sum www_static/frontend.html | cut -c-32`'"' >> version.py
else
echo 'Could not find an MD5 utility'
fi