fix(docker): multi-theme packaging with PS1 orchestration and full bundle export
Replace all-themes bat logic with PowerShell to survive branch checkout; add api-admin and full-themes service modes; fix bat findstr path check and cmd exit codes; document six-in-one tar and update gitignore for player/full-themes artifacts.
This commit is contained in:
@@ -25,7 +25,7 @@ default_tag() { echo "latest"; }
|
||||
|
||||
default_output() {
|
||||
local svc="$1" image_tag="$2"
|
||||
if [[ "$svc" == "all" ]]; then
|
||||
if [[ "$svc" == "all" || "$svc" == "api-admin" ]]; then
|
||||
echo "thebet365-images-${image_tag}.tar"
|
||||
else
|
||||
echo "thebet365-${svc}-${image_tag}.tar"
|
||||
@@ -39,8 +39,8 @@ validate_tag() {
|
||||
|
||||
validate_service() {
|
||||
case "$1" in
|
||||
all|api|player|admin) ;;
|
||||
*) echo "错误: --service 无效: $1(可选 api / player / admin / all)" >&2; exit 1 ;;
|
||||
all|api|player|admin|api-admin) ;;
|
||||
*) echo "错误: --service 无效: $1(可选 api / player / admin / api-admin / all)" >&2; exit 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ usage() {
|
||||
用法: docs/docker/build-and-export-images.sh [选项]
|
||||
|
||||
选项:
|
||||
--service SVC api | player | admin | all(默认 all)
|
||||
--service SVC api | player | admin | api-admin | all(默认 all)
|
||||
--tag TAG 镜像 tag(默认 latest)
|
||||
--use-cache 构建时使用 Docker 缓存(默认 --no-cache)
|
||||
--export-only 跳过构建,仅导出已有指定 tag 镜像
|
||||
@@ -105,6 +105,8 @@ OUTPUT="${OUTPUT:-$(default_output "$SERVICE" "$TAG")}"
|
||||
|
||||
if [[ "$SERVICE" == "all" ]]; then
|
||||
BUILD_SERVICES=(api player admin)
|
||||
elif [[ "$SERVICE" == "api-admin" ]]; then
|
||||
BUILD_SERVICES=(api admin)
|
||||
else
|
||||
BUILD_SERVICES=("$SERVICE")
|
||||
fi
|
||||
@@ -161,7 +163,7 @@ fi
|
||||
echo "tar=$(basename "$OUTPUT_PATH")"
|
||||
echo "tar_sha256=$CHECKSUM"
|
||||
for svc in "${BUILD_SERVICES[@]}"; do
|
||||
if [[ "$SERVICE" == "all" ]]; then
|
||||
if [[ "$SERVICE" == "all" || "$SERVICE" == "api-admin" ]]; then
|
||||
echo "${svc}_image=thebet365-${svc}:$TAG"
|
||||
echo "${svc}_image_id=$(docker image inspect "thebet365-${svc}:$TAG" --format '{{.Id}}')"
|
||||
else
|
||||
@@ -182,6 +184,8 @@ echo "Manifest: $MANIFEST_PATH"
|
||||
RECREATE="$SERVICE"
|
||||
if [[ "$SERVICE" == "all" ]]; then
|
||||
RECREATE="api player admin"
|
||||
elif [[ "$SERVICE" == "api-admin" ]]; then
|
||||
RECREATE="api admin"
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
|
||||
Reference in New Issue
Block a user