Building & releasing

For contributors. hamctl ships as prebuilt static binaries served from this site.

  1. Cross-compiling
  2. Publishing
  3. Documentation

Cross-compiling

build-dist.sh cross-compiles (via cross) the six published Linux targets into dist/ with a SHA256SUMS:

Token Rust target libc
x86_64 x86_64-unknown-linux-musl static musl
aarch64 aarch64-unknown-linux-musl static musl
armv7 armv7-unknown-linux-musleabihf static musl
armv6 arm-unknown-linux-musleabihf static musl
i386 i686-unknown-linux-musl static musl
riscv64 riscv64gc-unknown-linux-gnu gnu

Each target builds in its own --target-dir: cross images carry different glibc versions, so a shared target dir would let one image’s host build-script binary get reused in another (older-glibc) image and fail with GLIBC_x.y not found.

Publishing

release.sh does build → upload → verify in one step:

./release.sh

It runs build-dist.sh, prompts (hidden) for the download host’s SFTP password — never stored, passed to the uploader only via the environment — uploads the binaries + SHA256SUMS and install.sh, then re-fetches over HTTPS and checks the x86_64 checksum round-trips. Deploy config is env-overridable: SFTP_HOST, SFTP_USER, REMOTE_DIR, BASE_URL (and SFTP_PW to skip the prompt in CI).

Release flow: bump version in Cargo.toml, then ./release.sh. Existing installs pick it up via the installer’s update-in-place or hamctl upgrade.

Documentation

This site is a just-the-docs Jekyll site under docs/, built in a Docker ruby:3 container and published to the same vhost (alongside the installer) by publish-docs.sh.