update build info

This commit is contained in:
thuhole
2020-07-11 00:18:12 +08:00
parent b71d021d8f
commit aa26f14cd4

View File

@@ -10,7 +10,7 @@ after_success:
- git config --global user.email "thuhole@users.noreply.github.com"
- git remote rm origin
- git remote add origin https://thuhole:${GH_TOKEN}@github.com/thuhole/webhole.git
- CI=false REACT_APP_BUILD_INFO=$(printf "Travis%s" "$(TZ=Asia/Shanghai date +"%y%m%d%H%M%S")") npm run build
- CI=false REACT_APP_BUILD_INFO=$(printf "Dev%s" "$(TZ=Asia/Shanghai date +"%y%m%d%H%M%S")") npm run build
#额这里用了个骚操作来修复Service Worker在Precache CDN内容的时候index.html返回content-type text/plain的问题
- sed -i 's/\/\/cdn.jsdelivr.net\/gh\/thuhole\/webhole@gh-pages\/index.html/.\/index.html/g' build/*-*
- sed -i 's/\/\/cdn.jsdelivr.net\/gh\/thuhole\/webhole@gh-pages\/service-worker.js/.\/service-worker.js/g' build/*-*