脚本修改
This commit is contained in:
+8
-2
@@ -1,13 +1,19 @@
|
||||
#!/bin/bash
|
||||
# 任一步失败立即退出,避免编译失败时仍把模板上传到线上(新模板 + 旧二进制会导致页面渲染中断)
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
export PATH="$PATH:/usr/local/go/bin:$HOME/sdk/go/bin"
|
||||
echo "开始"
|
||||
rm -rf ./web_hgtv_h5 ./web_hgtv_h5.tar.gz
|
||||
GOOS=linux GOARCH=amd64 go build -o web_hgtv_h5
|
||||
tar zvcf web_hgtv_h5.tar.gz web_hgtv_h5 templates/ static/ \
|
||||
# macOS 的 tar 只识别写在文件列表前面的 --exclude;COPYFILE_DISABLE 避免打入 macOS 扩展属性
|
||||
COPYFILE_DISABLE=1 tar zvcf web_hgtv_h5.tar.gz \
|
||||
--exclude='templates/page/sitemaps/sitemap.xml' \
|
||||
--exclude='templates/page/sitemaps/sitemap-*.xml' \
|
||||
--exclude='templates/page/rss.xml' \
|
||||
--exclude='templates/page/llms.txt' \
|
||||
--exclude='templates/page/llms-full.txt'
|
||||
--exclude='templates/page/llms-full.txt' \
|
||||
web_hgtv_h5 templates/ static/
|
||||
|
||||
|
||||
scp web_hgtv_h5.tar.gz root@172.104.166.87:/data/uzip
|
||||
|
||||
Reference in New Issue
Block a user