From fa6ebe658e34f36d06ac100ab7569da518cc000d Mon Sep 17 00:00:00 2001 From: sdairs Date: Tue, 7 Apr 2026 23:29:59 +0100 Subject: [PATCH] Fix ldd check for static binaries ldd exits with code 1 for static binaries, which fails the step. Capture output with || true and grep for the expected messages instead. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0698e72..a9a26c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,7 @@ name: Release on: + workflow_dispatch: push: tags: - "v*" @@ -55,9 +56,11 @@ jobs: binary="target/${{ matrix.target }}/release/clickhousectl" echo "--- file output ---" file "$binary" - file "$binary" | grep -q "statically linked" + file "$binary" | grep -qE "statically linked|static-pie linked" echo "--- ldd output ---" - ! ldd "$binary" 2>&1 || ldd "$binary" 2>&1 | grep -q "not a dynamic executable" + ldd_output=$(ldd "$binary" 2>&1 || true) + echo "$ldd_output" + echo "$ldd_output" | grep -qE "not a dynamic executable|statically linked" echo "Static linking verified." - name: Rename binary