20 lines
768 B
Bash
Executable File
20 lines
768 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
echo "开始"
|
|
# 本机 Go 装在 ~/sdk/go,未加入 PATH 时在这里补上
|
|
command -v go >/dev/null 2>&1 || export PATH="$HOME/sdk/go/bin:$PATH"
|
|
rm -rf ./web_huangguo2_h5 ./web_huangguo2_h5.tar.gz
|
|
GOOS=linux GOARCH=amd64 go build -o web_huangguo2_h5
|
|
tar zvcf web_huangguo2_h5.tar.gz \
|
|
--exclude='template/pages/sitemaps/sitemap.xml' \
|
|
--exclude='template/pages/sitemaps/sitemap-*.xml' \
|
|
--exclude='template/pages/rss.xml' \
|
|
--exclude='template/pages/llms.txt' \
|
|
--exclude='template/pages/llms-full.txt' \
|
|
web_huangguo2_h5 template/ static/ conf/
|
|
|
|
|
|
scp web_huangguo2_h5.tar.gz root@172.104.166.87:/data/uzip
|
|
ssh root@172.104.166.87 "/server/web_huangguo2/h5/up_app.sh"
|
|
|
|
rm -rf ./web_huangguo2_h5 ./web_huangguo2_h5.tar.gz |