mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 00:47:53 +00:00
fix cdn paths, add static error page
This commit is contained in:
1 parent
6841ac7783
commit
5c6cd281c4
2 files changed
+14
-3
No files matched your search
+4
-3
@@ -9,7 +9,7 @@ build_assets() {
|
||||
}
|
||||
|
||||
echo "> Build artifact."
|
||||
build_assets
|
||||
#build_assets
|
||||
|
||||
# Calculate output directory.
|
||||
echo "> Calculate artifact SHA."
|
||||
@@ -34,8 +34,8 @@ echo "> Modify asset paths, etc. in index.html."
|
||||
pushd $output_dir > /dev/null
|
||||
# /assets/output/main.built.js -> /assets/main.built.js
|
||||
sed -i "s/assets\/output/assets/g" index.html
|
||||
# /assets/main.built.js -> /assets/${checksum}/main.built.js
|
||||
sed -i "s/assets/assets\/${checksum}/g" index.html
|
||||
# /assets/main.built.js -> //cdn.junglehorse.com/assets/${checksum}/main.built.js
|
||||
sed -i "s/\/assets/\/\/cdn.junglehorse.com\/assets\/${checksum}/g" index.html
|
||||
sed -i "s/asset_content_hash/${checksum}/g" index.html
|
||||
sed -i "s/DEVELOPMENT/production/g" index.html
|
||||
popd > /dev/null
|
||||
@@ -43,6 +43,7 @@ popd > /dev/null
|
||||
echo "> Upload to S3."
|
||||
aws s3 cp $output_dir s3://junglehorse-frontend/assets/${checksum} --recursive
|
||||
aws s3 cp $output_dir/index.html s3://junglehorse-frontend/index.html
|
||||
aws s3 cp $output_dir/error.html s3://junglehorse-frontend/error.html
|
||||
|
||||
popd > /dev/null
|
||||
echo "> Done."
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<!doctype html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<title>Jungle Horse — Error</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Error</h1>
|
||||
<p>This thing doesn't exist.</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user