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
#15639

In d8b3c9f and 4bb70ee 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 18, 2018
1 parent 3918bda commit a9c588f
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 $SCRIPT_DIR/save_javascript_pages.rb http://localhost:4567/javascript_pages_to_scrape.txt
}

deploy_viewer_static() {
Expand Down

0 comments on commit a9c588f

Please sign in to comment.