Merge pull request #76 from houdiniproject/deploying_build_improvements
Improvements to builds
This commit is contained in:
commit
68dcbaf515
3 changed files with 21 additions and 3 deletions
|
@ -6,8 +6,8 @@
|
|||
"url": "https://github.com/houdiniproject/houdini"
|
||||
},
|
||||
"scripts": {
|
||||
"watch": "npm run export-button-config && npm run export-i18n && npm run generate-api-js && npx webpack --watch",
|
||||
"build": "npm run export-button-config && npm run export-i18n && npm run generate-api-js && NODE_ENV=production npx webpack -p",
|
||||
"watch": "HOUDINI_WATCH=1 script/build.sh",
|
||||
"build": "script/build.sh",
|
||||
"build-all": "script/compile-assets.sh && npm run build",
|
||||
"test": "rake spec && npm run build && npx jest",
|
||||
"export-button-config": "bundle exec rake settings:generate_json",
|
||||
|
|
18
script/build.sh
Executable file
18
script/build.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/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 [ -z "$HOUDINI_WATCH"} ];
|
||||
then
|
||||
npx webpack --watch
|
||||
else
|
||||
NODE_ENV=production npx webpack -p
|
||||
fi
|
||||
)
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/bash
|
||||
(source .env; RAILS_ENV=production bundle exec rake assets:precompile)
|
||||
( RAILS_ENV=${RAILS_ENV:-production} DATABASE_URL=${BUILD_DATABASE_URL:-postgres://admin:password@db/commitchange_development} bundle exec rake assets:precompile )
|
||||
|
|
Loading…
Reference in a new issue