fix: use wildcard JAR matching for any version, fix health endpoints to /health (Boot 1.x)

Former-commit-id: 20071a784e3c5c1f8b392fd5ec8d44b500810359
This commit is contained in:
反编译工作区
2026-05-01 23:18:31 +08:00
parent 31ec44e21a
commit 7a7bf42165
3 changed files with 21 additions and 18 deletions
+7 -8
View File
@@ -21,13 +21,12 @@ else
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/"
# Sync JAR to deploy/ — use wildcard to match any version
LATEST_JAR=$(ls -t cw-elevator-application-starter/target/cw-elevator-application-*.jar 2>/dev/null | grep -v sources | head -1)
if [[ -n "$LATEST_JAR" ]]; then
cp "$LATEST_JAR" deploy/v2-maven/
log_ok "JAR synced: $(basename "$LATEST_JAR") deploy/v2-maven/"
else
# Fallback: use sync-jars.sh
cd deploy && bash sync-jars.sh
log_ok "JAR synced via sync-jars.sh"
log_error "No JAR found in target/"
exit 1
fi