Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VACMS-16237: Replace s3 address for assets. #16777

Merged
merged 4 commits into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading