Files
deploy-go/run.sh
T
bot d0cdfdc139
ci / test (push) Successful in 1m22s
初始版本:從 feather-vault 搬出
2026-11-05 02:54:22 +00:00

12 lines
746 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 依序執行部署的三個步驟:check-env → install-binary → activate。版本是必填的確切版本,不會去拿 @latest。
# .gitea/actions/deploy/run.sh <版本,例如 v0.4.9 或 v0.5.0-dev.2>
# 每個步驟都能單獨執行(見各檔案開頭),環境變數見 common.sh。CD 在沒有 git 的主機上用 curl 抓這個目錄的檔案再執行。
set -euo pipefail
dir=$(cd "$(dirname "$0")" && pwd)
version=${1:?用法:run.sh <版本,例如 v0.4.9>}
case "$version" in v[0-9]*.[0-9]*.[0-9]*) ;; *) echo "版本格式不對:$version(要像 v0.4.9 或 v0.5.0-dev.2)" >&2; exit 1 ;; esac
bash "$dir/check-env.sh"
bash "$dir/install-binary.sh" "$version"
bash "$dir/activate.sh" "$version"