Files
yueqian-erp/yueqian-erp-api/build-image.sh
T
zdh 0985dacbfe feat: init yueqian-erp based on xingyun
- Change groupId: com.lframework -> com.yueqian
- Change artifactId: xingyun -> yueqian-erp
- Rename modules: xingyun-* -> yueqian-erp-*
- Update Java packages: com.lframework.xingyun -> com.yueqian.xingyun
- Preserve external Jugg framework dependencies as com.lframework
- Update README and documentation
2026-06-13 20:07:18 +08:00

28 lines
657 B
Bash

#!/bin/sh
set -eu
usage() {
echo "Usage: sh build-image.sh [image:tag]"
echo
echo "Builds the xingyun-api jar and Docker image."
echo "Default image tag: xingyun-api:local"
}
if [ "${1:-}" = "-h" ] || [ "${1:-}" = "--help" ]; then
usage
exit 0
fi
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
REPO_ROOT=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)
IMAGE_TAG=${1:-xingyun-api:local}
echo "Packaging xingyun-api..."
mvn -f "$REPO_ROOT/pom.xml" -pl xingyun-api -am package -DskipTests
echo "Building Docker image: $IMAGE_TAG"
docker build -t "$IMAGE_TAG" -f "$SCRIPT_DIR/target/Dockerfile" "$SCRIPT_DIR/target"
echo "Done: $IMAGE_TAG"