This is an automated email from the ASF dual-hosted git repository.
lizhimins pushed a commit to branch rocketmq-studio
in repository https://gitbox.apache.org/repos/asf/rocketmq-dashboard.git
The following commit(s) were added to refs/heads/rocketmq-studio by this push:
new e1df685 fix: initialize deploy helpers before validation (#499)
e1df685 is described below
commit e1df6857e37233cf1bd28a0e499db968fe7c041d
Author: aias00 <[email protected]>
AuthorDate: Thu Jul 23 22:42:37 2026 -0700
fix: initialize deploy helpers before validation (#499)
Move logging/error helper initialization before config validation in
deploy.sh to fix err() undefined when REMOTE_HOST is missing.
---
deploy/deploy.sh | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/deploy/deploy.sh b/deploy/deploy.sh
index a67c810..754335e 100755
--- a/deploy/deploy.sh
+++ b/deploy/deploy.sh
@@ -10,6 +10,18 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
+# ─── 颜色输出 ───
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+CYAN='\033[0;36m'
+NC='\033[0m'
+
+log() { echo -e "${GREEN}[✓]${NC} $*"; }
+info() { echo -e "${CYAN}[→]${NC} $*"; }
+warn() { echo -e "${YELLOW}[!]${NC} $*"; }
+err() { echo -e "${RED}[✗]${NC} $*"; exit 1; }
+
# 加载配置
if [[ -f "$SCRIPT_DIR/.env" ]]; then
set -a
@@ -26,18 +38,6 @@ TMP_DIR="/tmp/rocketmq-studio-deploy"
TARGET="${1:-all}" # all | server | web
-# ─── 颜色输出 ───
-RED='\033[0;31m'
-GREEN='\033[0;32m'
-YELLOW='\033[1;33m'
-CYAN='\033[0;36m'
-NC='\033[0m'
-
-log() { echo -e "${GREEN}[✓]${NC} $*"; }
-info() { echo -e "${CYAN}[→]${NC} $*"; }
-warn() { echo -e "${YELLOW}[!]${NC} $*"; }
-err() { echo -e "${RED}[✗]${NC} $*"; exit 1; }
-
# ─── 前置检查 ───
check_prereqs() {
info "检查前置条件..."