🐛 fix: use shasum on macOS, sha256sum on Linux
- Detect which hash command is available - Fix script compatibility across platforms - Maintain same functionality Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -34,7 +34,12 @@ echo ""
|
|||||||
|
|
||||||
# 2. Calculate dependency hash (match CI workflow)
|
# 2. Calculate dependency hash (match CI workflow)
|
||||||
echo "2. Calculating dependency hash..."
|
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: $DEPS_HASH"
|
||||||
echo "✅ Dependency hash calculated"
|
echo "✅ Dependency hash calculated"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user