fix(ci): fix scripts/bundle-a2ui.sh shasum usage and format envelope.ts
This commit is contained in:
parent
7a11bb6f31
commit
8ad4753df8
@ -30,10 +30,22 @@ collect_files() {
|
||||
}
|
||||
|
||||
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 \
|
||||
| LC_ALL=C sort -z \
|
||||
| xargs -0 shasum -a 256 \
|
||||
| shasum -a 256 \
|
||||
| xargs -0 "$hash_cmd" "${hash_args[@]}" \
|
||||
| "$hash_cmd" "${hash_args[@]}" \
|
||||
| awk '{print $1}'
|
||||
}
|
||||
|
||||
|
||||
@ -237,11 +237,11 @@ export function formatAgentEnvelope(params: AgentEnvelopeParams): string {
|
||||
const elapsed =
|
||||
resolved.includeElapsed && params.timestamp && params.previousTimestamp
|
||||
? formatElapsedTime(
|
||||
params.timestamp instanceof Date ? params.timestamp.getTime() : params.timestamp,
|
||||
params.previousTimestamp instanceof Date
|
||||
? params.previousTimestamp.getTime()
|
||||
: params.previousTimestamp,
|
||||
)
|
||||
params.timestamp instanceof Date ? params.timestamp.getTime() : params.timestamp,
|
||||
params.previousTimestamp instanceof Date
|
||||
? params.previousTimestamp.getTime()
|
||||
: params.previousTimestamp,
|
||||
)
|
||||
: undefined;
|
||||
if (params.from?.trim()) {
|
||||
const from = params.from.trim();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user