When making bigger changes that need to be tested or fact-checked before they are deployed to GOV.UK you'll need to deploy the branch with changes to Heroku.
We have Heroku Review apps set up. This is running under @chao-xian's Heroku account. This will automatically deploy a Heroku instance of Smart Answers on creation of a PR. The PR number will also be automatically suffixed to the Heroku app name. The review app will also be automatically linked to from the PR. It will also update on each new commit to the PR.
Start by creating a GitHub pull request with the changes you want to deploy. Add the "Waiting on factcheck" label to the pull request to let other developers know that it's not ready to be reviewed.
Make a note of the pull request number and use the startup_heroku.sh
script to deploy your changes to Heroku:
$ PR=<number-of-pull-request> ./startup_heroku.sh
This script will create and configure an app on Heroku, push the current branch and open the marriage-abroad Smart Answer in the browser.
Once deployed you'll need to use the standard git push
mechanism to deploy your changes.
./startup_heroku.sh
The RatesQuery
object is responsible for looking up the correct rates (in lib/data/rates) to display. By default, it'll lookup the rates for today but that can be overridden by setting the RATES_QUERY_DATE
environment variable.
This is useful for previewing future rates on Heroku, e.g. when rates are being changed in the new tax year.
$ heroku config:set RATES_QUERY_DATE=<yyyy-mm-dd>