deploy.sh: image check no longer fails at random (grep -q + pipefail)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b302fa0b17
commit
872ebb94dd
1 file changed
+3
-1
+3
-1
@@ -73,7 +73,9 @@ case "$(remote 'uname -m')" in
|
|||||||
x86_64) arch=amd64 ;; aarch64|arm64) arch=arm64 ;; *) arch="" ;;
|
x86_64) arch=amd64 ;; aarch64|arm64) arch=arm64 ;; *) arch="" ;;
|
||||||
esac
|
esac
|
||||||
if [[ -n "$arch" ]]; then
|
if [[ -n "$arch" ]]; then
|
||||||
docker buildx imagetools inspect "$REGISTRY:$tag" 2>/dev/null | grep -q "Platform:.*linux/$arch" \
|
# Captured first: `inspect | grep -q` fails under pipefail when grep exits early (SIGPIPE).
|
||||||
|
manifests=$(docker buildx imagetools inspect "$REGISTRY:$tag" 2>/dev/null || true)
|
||||||
|
grep -q "Platform:.*linux/$arch" <<<"$manifests" \
|
||||||
|| fail "$REGISTRY:$tag has no linux/$arch image – run scripts/release.sh first"
|
|| fail "$REGISTRY:$tag has no linux/$arch image – run scripts/release.sh first"
|
||||||
fi
|
fi
|
||||||
echo "deploying $tag (running: ${current:-unknown}, target linux/${arch:-?})"
|
echo "deploying $tag (running: ${current:-unknown}, target linux/${arch:-?})"
|
||||||
|
|||||||
Reference in new issue
Block a user