From b50f5404ff3250a8bacbffc682248edb87a43a55 Mon Sep 17 00:00:00 2001 From: virusdefender Date: Fri, 5 Jan 2018 10:19:54 +0800 Subject: [PATCH] update replace static cdn host function --- deploy/entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy/entrypoint.sh b/deploy/entrypoint.sh index 055123c..97d6c62 100755 --- a/deploy/entrypoint.sh +++ b/deploy/entrypoint.sh @@ -39,8 +39,9 @@ fi cd $APP/dist if [ ! -z "$STATIC_CDN_HOST" ]; then - find . -name index.html -exec sed -i "s/link href=\/static/link href=\/\/$STATIC_CDN_HOST\/static/g" {} \; - find . -name index.html -exec sed -i "s/script type=text\/javascript src=\/static/script type=text\/javascript src=\/\/$STATIC_CDN_HOST\/static/g" {} \; + find . -name index.html -exec sed -i "s/__STATIC_CDN_HOST__/\/\/$STATIC_CDN_HOST/g" {} \; +else + find . -name index.html -exec sed -i "s/__STATIC_CDN_HOST__//g" {} \; fi cd $APP