c39a8f5f80
Replace hardcoded GIT_REMOTE variable with a function parameter so the shared deploy library can push to either the production or test remote from the same script. Rename push_to_server to push_to_remote and update both deploy_web.sh and deploy_web_test.sh to pass the appropriate remote.
18 lines
426 B
Bash
Executable File
18 lines
426 B
Bash
Executable File
#!/bin/bash
|
|
# ==========================================
|
|
# 生产环境 Web 部署脚本(Next.js + git push 模型)
|
|
# 原始 Dart: scripts/deploy/deploy_web.sh
|
|
# ==========================================
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
source "$SCRIPT_DIR/_deploy_lib.sh"
|
|
|
|
# 主函数
|
|
main() {
|
|
push_to_remote "production" "main"
|
|
NEW_VERSION=$(bump_version)
|
|
purge_cdn_cache
|
|
}
|
|
|
|
main
|