fix(ci): fix scripts/bundle-a2ui.sh shasum usage and format envelope.ts

This commit is contained in:
Raj bhoyar 2026-01-27 13:36:00 +05:30
parent 7a11bb6f31
commit 8ad4753df8
2 changed files with 19 additions and 7 deletions

View File

@ -30,10 +30,22 @@ collect_files() {
} }
compute_hash() { compute_hash() {
local hash_cmd
local hash_args=()
if command -v shasum >/dev/null 2>&1; then
hash_cmd="shasum"
hash_args=("-a" "256")
elif command -v sha256sum >/dev/null 2>&1; then
hash_cmd="sha256sum"
else
echo "Error: shasum/sha256sum not found" >&2
exit 1
fi
collect_files \ collect_files \
| LC_ALL=C sort -z \ | LC_ALL=C sort -z \
| xargs -0 shasum -a 256 \ | xargs -0 "$hash_cmd" "${hash_args[@]}" \
| shasum -a 256 \ | "$hash_cmd" "${hash_args[@]}" \
| awk '{print $1}' | awk '{print $1}'
} }