18
required: false
19
default: 'latest'
20
type: string
21
+ built_from_this_checkout:
22
+ description: >-
23
+ Set by callers whose run built the release under test from this
24
+ branch. Those legs must produce the CLI-managed PATH line; legs that
25
+ install an older published release may still produce install.sh's
26
+ legacy block.
27
+ required: false
28
+ default: false
29
+ type: boolean
30
31
permissions:
32
contents: read
343
fi
344
345
- name: Test shell config updates
346
+ env:
347
+ BUILT_FROM_THIS_CHECKOUT: ${{ inputs.built_from_this_checkout }}
348
run: |
349
echo "Checking shell configuration updates..."
350
363
exit 1
364
fi
365
355
- # Every leg of this workflow installs a published release binary, never one
356
- # built from this checkout: releases predating the CLI-managed PATH line
357
- # (workflow_dispatch re-verification, workflow_call with the default
358
- # 'latest', promote-stable rebuilds of an older beta) still write the
359
- # legacy install.sh block with COMPOSIO_INSTALL_DIR, as does install.sh's
360
- # fallback when the binary cannot run. Accept either working layout and
361
- # fail only when neither PATH setup is present.
366
+ # Which PATH layout is acceptable depends on where the binary under test
367
+ # came from. Build CLI Binaries calls this workflow with
368
+ # built_from_this_checkout, having released the binary in that same run
369
+ # from this branch, so `composio install` must have written the
370
+ # CLI-managed line — a broken install that silently falls through to
371
+ # install.sh's inline writer has to fail here. Every other leg
372
+ # (workflow_dispatch re-verification, the default 'latest', tag pushes,
373
+ # promote-stable rebuilds of an older beta's commit) installs a release
374
+ # that may predate the CLI-managed line and still writes the legacy
375
+ # install.sh block with COMPOSIO_INSTALL_DIR, which stays acceptable.
376
if grep -Fqx 'export PATH="$HOME/.composio:$PATH"' "$config_file"; then
377
if grep -q 'COMPOSIO_INSTALL_DIR' "$config_file"; then
378
echo "❌ $config_file has the CLI-managed PATH line but still persists COMPOSIO_INSTALL_DIR"
381
exit 1
382
fi
383
echo "✅ $config_file updated with the CLI-managed PATH line"
384
+ elif [[ "$BUILT_FROM_THIS_CHECKOUT" == "true" ]]; then
385
+ echo "❌ $config_file has no CLI-managed PATH line, so \`composio install\` did not configure PATH"
386
+ echo "This release was built from this checkout, so install.sh's legacy fallback block is not acceptable here."
387
+ echo "=== $config_file contents ==="
388
+ cat "$config_file"
389
+ exit 1
390
elif grep -Fqx 'export PATH="$COMPOSIO_INSTALL_DIR:$PATH"' "$config_file" &&
391
grep -Eq '^export COMPOSIO_INSTALL_DIR=' "$config_file"; then
392
echo "✅ $config_file updated with the legacy install.sh PATH block"