Release binaries and install script #11

Closed
opened 2026-10-01 21:55:17 -05:00 by deadstyle · 1 comment
Owner

Problem

Users should be able to install lazyforge with one command: a bash install script that downloads the right binary for their machine. That requires published release binaries, which don't exist yet.

Plan

Releases (Opus decides the tooling and records an ADR):

  1. On a v* tag pushed to main, a Forgejo workflow builds static binaries for linux/amd64, linux/arm64, darwin/amd64 and darwin/arm64, with the version stamped in through -ldflags.
  2. It publishes a Forgejo release with the archives and a checksums.txt (SHA-256).
  3. Tooling options to decide between: GoReleaser (handles Forgejo/Gitea releases natively) or a plain make release plus the release API. Fewer moving parts wins unless GoReleaser buys something concrete.

Install script (install.sh at the repo root):

  1. Run as curl -fsSL https://git.bobparsons.dev/deadstyle/lazyforge/raw/branch/main/install.sh | bash.
  2. Detects OS and architecture, and resolves the latest release (or LAZYFORGE_VERSION=v1.2.3).
  3. Downloads the archive and checksums.txt, and refuses to install on a checksum mismatch.
  4. Installs to ~/.local/bin by default (LAZYFORGE_INSTALL_DIR overrides). No sudo unless the target directory needs it. Prints a PATH hint if the directory isn't on PATH.
  5. Re-running it upgrades in place. It must be safe to run twice.
  6. Works with bash and the standard tools present on stock Linux and macOS (curl, tar, sha256sum/shasum). Tested with shellcheck and in CI on both platforms if a macOS runner is available, otherwise Linux only, documented as such.

Context

  • The repo is publicly readable (anonymous API access returns 200), so downloads need no token.
  • docs/design.md → "Install and updates".
  • The startup update check reuses the same release assets and checksum verification.
  • Release automation and binary signing are engineering decisions. Signing is out of scope for v1; checksums are required.
## Problem Users should be able to install lazyforge with one command: a bash install script that downloads the right binary for their machine. That requires published release binaries, which don't exist yet. ## Plan **Releases** (Opus decides the tooling and records an ADR): 1. On a `v*` tag pushed to `main`, a Forgejo workflow builds static binaries for linux/amd64, linux/arm64, darwin/amd64 and darwin/arm64, with the version stamped in through `-ldflags`. 2. It publishes a Forgejo release with the archives and a `checksums.txt` (SHA-256). 3. Tooling options to decide between: GoReleaser (handles Forgejo/Gitea releases natively) or a plain `make release` plus the release API. Fewer moving parts wins unless GoReleaser buys something concrete. **Install script** (`install.sh` at the repo root): 1. Run as `curl -fsSL https://git.bobparsons.dev/deadstyle/lazyforge/raw/branch/main/install.sh | bash`. 2. Detects OS and architecture, and resolves the latest release (or `LAZYFORGE_VERSION=v1.2.3`). 3. Downloads the archive and `checksums.txt`, and **refuses to install on a checksum mismatch**. 4. Installs to `~/.local/bin` by default (`LAZYFORGE_INSTALL_DIR` overrides). No sudo unless the target directory needs it. Prints a PATH hint if the directory isn't on `PATH`. 5. Re-running it upgrades in place. It must be safe to run twice. 6. Works with `bash` and the standard tools present on stock Linux and macOS (`curl`, `tar`, `sha256sum`/`shasum`). Tested with `shellcheck` and in CI on both platforms if a macOS runner is available, otherwise Linux only, documented as such. ## Context - The repo is publicly readable (anonymous API access returns 200), so downloads need no token. - `docs/design.md` → "Install and updates". - The startup update check reuses the same release assets and checksum verification. - Release automation and binary signing are engineering decisions. Signing is out of scope for v1; checksums are required.
Author
Owner

🤖 Merged in #26. Pushing a v* tag on main builds Linux and macOS binaries (amd64/arm64) and publishes a release with checksums. install.sh installs or upgrades into ~/.local/bin and refuses a download whose checksum doesn't match. The release token is only exercised by the first real tag push.

🤖 Merged in #26. Pushing a v* tag on main builds Linux and macOS binaries (amd64/arm64) and publishes a release with checksums. install.sh installs or upgrades into ~/.local/bin and refuses a download whose checksum doesn't match. The release token is only exercised by the first real tag push.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
deadstyle/lazyforge#11
No description provided.