feat: add test env infra compose, config templates, build/prepare scripts

Former-commit-id: 70b7cd14e81c8f43300638dcd5f9859115e1959a
This commit is contained in:
反编译工作区
2026-05-01 19:41:18 +08:00
parent 8b15445328
commit e9cd71029d
8 changed files with 345 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
#!/bin/bash
# build-elevator-v2.sh — 编译 cw-elevator-application V2
source "$(dirname "${BASH_SOURCE[0]}")/config/env.sh"
log_info "Building V2 elevator application..."
cd "$REPO_ROOT/maven-cw-elevator-application"
export JAVA_HOME
export PATH="$JAVA_HOME/bin:$PATH"
log_info "JDK: $($JAVA -version 2>&1 | head -1)"
# Build (skip tests)
$MVN clean install $MVN_OPTS 2>&1 | tail -5
if [[ ${PIPESTATUS[0]} -eq 0 ]]; then
log_ok "V2 elevator build SUCCESS"
else
log_error "V2 elevator build FAILED — check logs"
exit 1
fi
# Sync JAR to deploy/
if [[ -f "cw-elevator-application-starter/target/cw-elevator-application-2.0.7.jar" ]]; then
cp cw-elevator-application-starter/target/cw-elevator-application-2.0.7.jar \
deploy/v2-maven/cw-elevator-application-2.0.7.jar
log_ok "JAR synced to deploy/v2-maven/"
else
# Fallback: use sync-jars.sh
cd deploy && bash sync-jars.sh
log_ok "JAR synced via sync-jars.sh"
fi