diff --git a/scripts/update b/scripts/update index a490146d..ff029b1b 100755 --- a/scripts/update +++ b/scripts/update @@ -63,11 +63,21 @@ function run_data_fixtures() { if [ $1 ]; then echo "*** Importing crash data..." docker compose run --rm --entrypoint python3 django manage.py import_crash_data + + # The sample analysis results fixture takes a few steps echo "*** Downloading sample analysis results fixture..." aws --profile pfb s3 sync --exclude "*" --include "sample_analysis_results.json.gz" \ "s3://test-pfb-inputs/" src/django/pfb_analysis/fixtures/ echo "*** Loading sample analysis results fixture..." docker compose run --rm --entrypoint python3 django manage.py loaddata sample_analysis_results + echo "*** Copying S3 files for sample analysis results fixture into your bucket..." + # If we're running on host rather than in Vagrant, source .env to get the DEV_USER variable + if [ -z $DEV_USER ]; then + source .env + fi + aws --profile pfb s3 sync --quiet \ + "s3://test-pfb-inputs/fixture_results_files/" \ + "s3://${DEV_USER}-pfb-storage-us-east-1/results/" fi docker compose stop database }