Merge branch 'dev'
This commit is contained in:
@@ -86,11 +86,11 @@ jobs:
|
||||
if: steps.guard.outputs.skip != 'true'
|
||||
run: |
|
||||
echo "--- 产物一致性检查 ---"
|
||||
local_index=$(node -p "require('fs').readFileSync('dist/index.html','utf8').match(/index-[A-Za-z0-9_-]+\\.js/)?.[0] || ''")
|
||||
remote_index=$(grep -oE "index-[A-Za-z0-9_-]+\.js" /mnt/nginx-html/gao/index.html | head -1)
|
||||
echo "本地入口:$local_index"
|
||||
echo "线上入口:$remote_index"
|
||||
if [ "$local_index" != "$remote_index" ]; then
|
||||
local_sum=$(md5sum dist/index.html | cut -d' ' -f1)
|
||||
remote_sum=$(md5sum /mnt/nginx-html/gao/index.html | cut -d' ' -f1)
|
||||
echo "本地 index.html:$local_sum"
|
||||
echo "线上 index.html:$remote_sum"
|
||||
if [ "$local_sum" != "$remote_sum" ]; then
|
||||
echo "FAIL: 线上 index.html 与本次产物不一致"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user