houdini/script/build.sh

20 lines
417 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
2019-11-05 21:51:46 +00:00
yarn export-button-config && yarn export-i18n && yarn generate-api-js
2018-06-27 19:53:09 +00:00
if [ -n "$HOUDINI_WATCH" ];
2018-06-27 19:53:09 +00:00
then
echo "we're gonna watch!!!"
2019-11-05 21:51:46 +00:00
yarn webpack --watch
2018-06-27 19:53:09 +00:00
else
echo "we're gonna build!!!"
2019-11-05 21:51:46 +00:00
NODE_ENV=production yarn webpack -p
2018-06-27 19:53:09 +00:00
fi
)