From 543e9e240a38ee8f9fe0d5fa7186940040a9d0ad Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Wed, 8 Apr 2026 00:18:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20use=20shasum=20on=20macOS?= =?UTF-8?q?,=20sha256sum=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Detect which hash command is available - Fix script compatibility across platforms - Maintain same functionality Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- scripts/test-local-ci-cd.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/test-local-ci-cd.sh b/scripts/test-local-ci-cd.sh index ca1e536..0d8e5eb 100755 --- a/scripts/test-local-ci-cd.sh +++ b/scripts/test-local-ci-cd.sh @@ -34,7 +34,12 @@ echo "" # 2. Calculate dependency hash (match CI workflow) echo "2. Calculating dependency hash..." -export DEPS_HASH=$(sha256sum go.mod go.sum | sha256sum | cut -d' ' -f1 | head -c 12) +# Use shasum on macOS, sha256sum on Linux +if command -v sha256sum >/dev/null 2>&1; then + export DEPS_HASH=$(sha256sum go.mod go.sum | sha256sum | cut -d' ' -f1 | head -c 12) +else + export DEPS_HASH=$(shasum -a 256 go.mod go.sum | shasum -a 256 | cut -d' ' -f1 | head -c 12) +fi echo "Dependency hash: $DEPS_HASH" echo "✅ Dependency hash calculated" echo ""