Files
zeekay 5d0e4515c5 Publish the train from CI when main names a version npm lacks
.github/workflows/publish.yml runs on every push to main on a cluster
runner. When @hanzo/gui's version on disk is ahead of npm's latest it
installs, builds, checks, lints and typechecks, reads NPM_TOKEN from KMS
the way hanzoai/i18n does (masked), and publishes the train with
`release.ts --republish --ci`, the one script that rewrites workspace:*.
Any other push answers "not ahead" in seconds; a dispatch at the served
version finishes a train that stopped part way.

It replaces publish-gui-all.yml, which never ran, with the npm-token
action and publish-gui-surface.mjs, a second publisher that covered
only the @hanzogui/* closure.

typecheck.sh called `tsgo`, which is not installed, so every typecheck
died on "command not found". TypeScript 7 ships as `tsc`.

Claude-Session: https://claude.ai/code/session_01BLLMyBFSvAfCt7ZGqYuiEz
2026-10-22 12:12:18 -07:00

24 lines
996 B
Bash
Executable File

#!/bin/bash
# TypeScript 7 — the native Go compiler — ships under the stable `typescript`
# name with `tsc` as its binary, so `tsc` here IS the fast compiler. This script
# called `tsgo`, the pre-release channel's name for the same binary, which is
# not installed: every `bun run typecheck` died on "command not found".
#
# The compiler's status is the verdict, and it is the only one. This used to
# read the verdict out of the compiler's own prose — `grep -q "error"` over the
# captured output — which calls anything that fails without writing that word a
# pass. A missing compiler is exactly that case: the shell says "command not
# found", the grep misses, and the gate reports green having typechecked
# nothing. Diagnostics now stream as they are produced rather than arriving in
# one block at the end.
tsc -b --preserveWatchOutput tsconfig.build.json "$@"
status=$?
if [ $status -ne 0 ]; then
echo "‼️ Type check failed"
exit $status
fi
echo "✅ Type check passed"