build-images.sh: detect Podman without a pipe (pipefail + grep -q)
Build Kvitt images / build (push) Has been cancelled
Build Kvitt images / build (push) Has been cancelled
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
@@ -45,7 +45,9 @@ images=(
|
|||||||
"kvitt-backup|infra/backup|infra/backup/Dockerfile"
|
"kvitt-backup|infra/backup|infra/backup/Dockerfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
if docker version 2>/dev/null | grep -qi podman; then engine=podman; else engine=docker; fi
|
# Capture first: `grep -q` in a pipe closes it early, `docker version` dies of SIGPIPE and pipefail makes the test fail.
|
||||||
|
engine_info="$(docker version 2>/dev/null || true)"
|
||||||
|
if [[ "$engine_info" == *[Pp]odman* ]]; then engine=podman; else engine=docker; fi
|
||||||
echo "Engine: $engine; registry: $registry; tag: $tag (and latest); push: $([[ $push == 1 ]] && echo yes || echo no)"
|
echo "Engine: $engine; registry: $registry; tag: $tag (and latest); push: $([[ $push == 1 ]] && echo yes || echo no)"
|
||||||
|
|
||||||
if [[ $push == 1 && -n "$user" && -n "$token" ]]; then
|
if [[ $push == 1 && -n "$user" && -n "$token" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user