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
|
|
|
|
|
2018-06-27 21:56:54 +00:00
|
|
|
if [ -n "$HOUDINI_WATCH" ];
|
2018-06-27 19:53:09 +00:00
|
|
|
then
|
2018-06-27 21:56:54 +00:00
|
|
|
echo "we're gonna watch!!!"
|
2018-06-27 19:53:09 +00:00
|
|
|
npx webpack --watch
|
|
|
|
else
|
2018-06-27 21:56:54 +00:00
|
|
|
echo "we're gonna build!!!"
|
2018-06-27 19:53:09 +00:00
|
|
|
NODE_ENV=production npx webpack -p
|
|
|
|
fi
|
|
|
|
)
|