diff --git a/scripts/web-build.sh b/scripts/web-build.sh index ebdc8e0cb5..bdc714984b 100755 --- a/scripts/web-build.sh +++ b/scripts/web-build.sh @@ -17,7 +17,6 @@ touch ./.buildlock build_type="vagovdev" web_path="./web" build_path="${web_path}/build/${build_type}" -assets_base_url="https://dev-va-gov-assets\.s3-us-gov-west-1\.amazonaws\.com" rm -rf "${build_path}" pushd "${web_path}" @@ -35,11 +34,19 @@ yarn build \ popd echo "Replacing s3 address with local in generated files." +assets_base_url="https://dev-va-gov-assets\.s3-us-gov-west-1\.amazonaws\.com" find \ "${build_path}/generated" \ -type f \ -exec sed -i "s#${assets_base_url}##g" {} \+; +echo "Replacing s3 address with local in built content." +dev_base_url="https://s3-us-gov-west-1\.amazonaws\.com/content\.dev\.va\.gov" +find \ + "${build_path}" \ + -type f \ + -exec sed -i -e "s#${dev_base_url}##g" {} \+; + rm ./.buildlock popd > /dev/null