From 937ede7cb8fc0bd7a54eeeb4a761c66ded03b4fd Mon Sep 17 00:00:00 2001 From: Michal Domonkos Date: Fri, 15 Sep 2023 09:52:29 +0200 Subject: [PATCH] Finish build --- tests/mktree.podman | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/mktree.podman b/tests/mktree.podman index 60a8ced8f6..6c26c43328 100755 --- a/tests/mktree.podman +++ b/tests/mktree.podman @@ -36,10 +36,24 @@ fi case $CMD in build) target=full - [ "$1" == "--native" ] && target=base + if [ "$1" == "--native" ]; then + error=0 + if [ "$CONTEXT" == ".." ]; then + error=1 + message="in source dir" + fi + if [ "$(basename $PODMAN)" == "docker" ]; then + error=1 + message="with Docker" + fi + if [ $error == 1 ]; then + echo "Native build not supported $message." >&2 + exit 1 + fi + target=base + fi # Build (base) image - cd $(dirname $0) $PODMAN build --target $target -t $IMAGE_BASE -f Dockerfile $CONTEXT # Finish unless building RPM natively