Skip to content

Commit ebecc7b

Browse files
TeoSlayerteovlclaude
authored
fix(publish): stop shipping a Go object archive as pilot-gateway (#16)
The gateway build fallback (go build . on the library repo) produced an 'ar archive', not an executable — v1.12.4 wheels ship a 380KB pilotprotocol/bin/pilot-gateway that cannot run. Build only when ./cmd/gateway exists; otherwise skip with a log line. The runtime already tolerates a missing binary (clear error on invocation). Co-authored-by: Teodor Calin <teodor@vulturelabs.io> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 79cffe1 commit ebecc7b

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,17 @@ jobs:
184184
( cd web4 && CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o "$OUT/pilot-updater" ./cmd/updater )
185185
186186
echo "Building gateway..."
187-
( cd gateway && go mod tidy && CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o "$OUT/pilot-gateway" ./cmd/gateway ) \
188-
|| ( cd gateway && CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o "$OUT/pilot-gateway" . )
187+
# The gateway repo is currently a library (no ./cmd/gateway). The old
188+
# fallback `go build .` compiled that library into a Go object archive
189+
# and shipped it as "pilot-gateway" — a non-executable file (the v1.12.4
190+
# wheels contain it). Skip cleanly instead; the console script then
191+
# fails with a clear missing-binary error, and the build resumes
192+
# automatically if the repo grows a cmd/gateway again.
193+
if [ -d gateway/cmd/gateway ]; then
194+
( cd gateway && go mod tidy && CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o "$OUT/pilot-gateway" ./cmd/gateway )
195+
else
196+
echo "gateway repo has no cmd/gateway — skipping pilot-gateway binary"
197+
fi
189198
190199
echo "Building libpilot CGO shared library..."
191200
( cd libpilot && CGO_ENABLED=1 go build -buildmode=c-shared -ldflags "-s -w" -o "$OUT/libpilot.$EXT" . )

0 commit comments

Comments
 (0)