houdini/script/build.sh

20 lines
424 B
Bash
Raw Normal View History

2018-06-27 19:53:09 +00:00
#!/bin/bash
(
echo $HOUDINI_WATCH
set -e
set -o pipefail
export DATABASE_URL=${BUILD_DATABASE_URL:-postgres://admin:password@db/commitchange_development}
echo $DATABASE_URL
npm run export-button-config && npm run export-i18n && npm run generate-api-js
if [ -n "$HOUDINI_WATCH" ];
2018-06-27 19:53:09 +00:00
then
echo "we're gonna watch!!!"
2018-06-27 19:53:09 +00:00
npx webpack --watch
else
echo "we're gonna build!!!"
2018-06-27 19:53:09 +00:00
NODE_ENV=production npx webpack -p
fi
)