Skip to content

Commit

Permalink
VACMS-16237: Replace s3 address for assets. (#16777)
Browse files Browse the repository at this point in the history
* VACMS-16237: Replace s3 address for assets.

* Subtract a line.

* Try a local build.

* So much for KISS.
  • Loading branch information
ndouglas authored Jan 10, 2024
1 parent e427a1c commit 8a12098
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/web-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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

0 comments on commit 8a12098

Please sign in to comment.