Skip to content

Commit

Permalink
Add saving JS pages to static site build script
Browse files Browse the repository at this point in the history
In previous commits we added a way to generate some of our static pages
after JavaScript had finished running. This commit adds this step into
the static site generation build script.

After `wget` has finished running this script overwrites some of the
static files it generated with the (currently) few pages we want
enhanced with JS.
  • Loading branch information
henare committed Jan 19, 2018
1 parent e8fdf48 commit 2ba56ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ set -eo pipefail
build_viewer_static() {
bundle exec ruby app.rb &
while ! nc -z localhost 4567; do sleep 1; done
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd /tmp
wget -nv -m localhost:4567/status/all_countries.html || (echo "wget exited with non-zero exit code: $?" >&2 && exit 1)
cd localhost:4567
BUNDLE_GEMFILE=$SCRIPT_DIR/../Gemfile bundle exec rake -f $SCRIPT_DIR/../Rakefile generate_static_site_javascript_pages
}

deploy_viewer_static() {
Expand Down

0 comments on commit 2ba56ca

Please sign in to comment.