-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatic-build
More file actions
executable file
·27 lines (20 loc) · 811 Bytes
/
static-build
File metadata and controls
executable file
·27 lines (20 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env sh
set -eu
# Run the app in production mode to ensure correct asset URLs are generated etc.
export RAILS_ENV=production
export SECRET_KEY_BASE=dummy
# If your Rails app uses ActiveRecord then this is a good point to create and
# seed the database from db/seeds.rb.
bundle exec rails db:setup
# Generate production-optimised assets with Sprockets and friends. This must be
# done before generating the Parklife build as Rails will blow up if it detects
# missing assets in production.
bundle exec rails assets:precompile
# Build with Parklife - and forward arguments sent to this script.
bundle exec parklife build "$@"
# Copy all public resources to ./build.
if [ -d public ]; then
cp -R public/* build
fi
# List all files in the build (useful for debugging).
find build -type f | sort