0985dacbfe
- 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
28 lines
696 B
Bash
28 lines
696 B
Bash
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
usage() {
|
|
echo "Usage: sh build-image.sh [image:tag]"
|
|
echo
|
|
echo "Builds the xingyun-cloud-api jar and Docker image."
|
|
echo "Default image tag: xingyun-cloud-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-cloud-api:local}
|
|
|
|
echo "Packaging xingyun-cloud-api..."
|
|
mvn -f "$REPO_ROOT/pom.xml" -pl cloud/xingyun-cloud-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"
|