Skip to content

fix: install the CLI from its release tarball - #420

Merged
edenreich merged 1 commit into
mainfrom
fix/cli-tarball
Nov 3, 2026
Merged

edenreich merged 1 commit into
mainfrom
fix/cli-tarball

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

inference-gateway/cli#1688 changes the CLI release assets from raw executables to infer-<os>-<arch>.tar.gz holding a single infer (infer.exe on Windows). The desktop installs and updates the CLI from releases/latest/download, so it has to speak the new shape before that release ships, or every installed desktop fails to install or update the CLI.

Changes

  • backend/src/env.rs: asset_name maps to the .tar.gz asset. The test's private copy of the mapping is gone, the test now covers the real function.
  • backend/src/cli_install.rs: downloads the archive, verifies the archive's checksum against checksums.txt, extracts it with the system tar into ~/.infer/bin/cli-install.tmp and renames the executable into place, the same atomic replace as before. The gateway install already extracts its tarball the same way.
  • README.md: the supported platforms table names the archives.

cargo fmt --check, cargo clippy -- -D warnings and cargo test pass.

Refs inference-gateway/cli#1687. Release this before inference-gateway/cli#1688 merges.

Releases of inference-gateway/cli ship infer-<os>-<arch>.tar.gz holding
one infer executable instead of a raw binary from the next release on.
The installer downloads the archive, verifies its checksum, extracts it
with the system tar into a staging directory beside the binary and
renames the executable into place, so a running infer is never written
over.

Refs inference-gateway/cli#1687
edenreich added a commit to inference-gateway/cli that referenced this pull request Nov 3, 2026
## Summary

GitHub serves release assets uncompressed, so every install moved the
whole executable, about 105MB per platform (80MB after #1686). Each
platform now ships as `infer-<os>-<arch>.tar.gz` holding one file,
`infer` (`infer.exe` on Windows). `checksums.txt` and its Cosign bundle
cover the archives.

- `release.yml` archives the artifacts in the release job with GNU tar
(`--transform` renames the entry, `--owner=0 --group=0`), checksums the
archives and verifies the new asset list.
- `release.config.mjs` uploads the archives.
- `install.sh`, `install.ps1` and `npm/bin/install.js` download the
archive and extract it with the system `tar`, which macOS, Linux and
Windows 10+ ship.
- `docs/installation.md` and `docs/binary-verification.md` describe the
archives.
- The container image builds from the workflow's raw artifacts via
`--build-context binaries=dist/`, unchanged.

The raw `infer-<os>-<arch>` release assets are gone.

| | before | after |
| --- | --- | --- |
| darwin/arm64 asset | 79.4MB raw | 25.9MB `.tar.gz` |

## Affected repos

Consumers of the raw asset names outside this repository, found with `gh
search code` and a grep of shallow clones:

- **inference-gateway/infer-action**: inference-gateway/infer-action#433
downloads the archive and falls back to the raw asset for pinned older
versions.
- **inference-gateway/desktop**: `backend/src/env.rs` maps the platform
to the raw asset name and `backend/src/cli_install.rs` downloads it from
`releases/latest/download`, verifies it against `checksums.txt` and
renames it into place. inference-gateway/desktop#420 downloads the
archive, verifies it and extracts it. Desktop builds already installed
keep calling the raw URL, so that desktop release should go out before
this merges.
- **inference-gateway/opentask** pins the Nix flake and
**inference-gateway/docs** only points at `install.sh`. Neither changes.

## Verification

- `install.sh` and the npm postinstall run against a local server
holding a `.tar.gz` built from this branch's binary and its
`checksums.txt`: both install a working `infer`, and a tampered checksum
fails the npm install.
- The archive step ran under GNU tar 1.35 from nixpkgs: the Linux
archive holds `infer`, the Windows one `infer.exe`, both owned by root.
- `task precommit:run` passes.

Closes #1687
@edenreich
edenreich marked this pull request as ready for review November 3, 2026 01:11
@edenreich
edenreich merged commit a89d6c3 into main Nov 3, 2026
1 check passed
@edenreich
edenreich deleted the fix/cli-tarball branch November 3, 2026 01:12
@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.53.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant