Skip to content

Add curl and Homebrew installs backed by GitHub releases - #5

Merged
mcaney006 merged 1 commit into
mainfrom
install-brew-curl
Nov 18, 2026
Merged

mcaney006 merged 1 commit into
mainfrom
install-brew-curl

Conversation

@mcaney006

@mcaney006 mcaney006 commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner
  • .github/workflows/release.yml: on a vX.Y.Z tag, check the tag against
    the versions in report.zig and build.zig.zon, run the tests, build the
    static binaries, package them, publish a GitHub release with
    SHA256SUMS, then install that release with install.sh on Linux x86_64,
    Linux aarch64 and macOS arm64.
  • packaging/package.sh: deterministic zigmap--.tar.gz archives
    (binary and README) and SHA256SUMS.
  • install.sh: picks the asset for the OS and CPU, verifies the checksum,
    installs to /usr/local/bin if writable or ~/.local/bin, never runs sudo.
    ZIGMAP_VERSION, ZIGMAP_INSTALL_DIR and ZIGMAP_BASE_URL override the
    defaults.
  • packaging/homebrew/render-formula.sh: prints the formula for the
    mcaney006/homebrew-zigmap tap from a release's SHA256SUMS.
  • build.zig.zon version set to 0.2.0 to match report.zig.
  • README install section and docs/releasing.md.

Tested locally: packaging twice gives identical SHA256SUMS; install.sh
installs and runs on macOS arm64 (curl, file://), Alpine (busybox wget,
root) and Ubuntu (curl, non-root to ~/.local/bin), and refuses a
tampered archive; the rendered formula passes brew style.


Devin Review


Note

Low Risk
Changes are limited to release automation, packaging scripts, and docs; the scanner runtime is unchanged aside from the package version bump.

Overview
Adds a tag-driven release pipeline and user-facing install paths for prebuilt zigmap binaries on Linux and macOS (x86_64 and aarch64).

Pushing a v* tag triggers .github/workflows/release.yml, which verifies the tag against src/output/report.zig and build.zig.zon, runs tests, builds release binaries, runs packaging/package.sh for deterministic zigmap-<arch>-<os>.tar.gz assets plus SHA256SUMS, publishes a GitHub release, and smoke-tests install.sh on a small OS matrix.

New install.sh downloads the matching release asset, verifies checksums, and installs without sudo (configurable via ZIGMAP_VERSION, ZIGMAP_INSTALL_DIR, ZIGMAP_BASE_URL). packaging/homebrew/render-formula.sh generates the Homebrew tap formula from release checksums. docs/releasing.md and an Install section in the README document Homebrew, curl pipe, and manual release downloads. Package version is bumped to 0.2.0 in build.zig.zon, and dist/ is gitignored.

Reviewed by Cursor Bugbot for commit 180d842. Configure here.

- .github/workflows/release.yml: on a vX.Y.Z tag, check the tag against
  the versions in report.zig and build.zig.zon, run the tests, build the
  static binaries, package them, publish a GitHub release with
  SHA256SUMS, then install that release with install.sh on Linux x86_64,
  Linux aarch64 and macOS arm64.
- packaging/package.sh: deterministic zigmap-<arch>-<os>.tar.gz archives
  (binary and README) and SHA256SUMS.
- install.sh: picks the asset for the OS and CPU, verifies the checksum,
  installs to /usr/local/bin if writable or ~/.local/bin, never runs sudo.
  ZIGMAP_VERSION, ZIGMAP_INSTALL_DIR and ZIGMAP_BASE_URL override the
  defaults.
- packaging/homebrew/render-formula.sh: prints the formula for the
  mcaney006/homebrew-zigmap tap from a release's SHA256SUMS.
- build.zig.zon version set to 0.2.0 to match report.zig.
- README install section and docs/releasing.md.

Tested locally: packaging twice gives identical SHA256SUMS; install.sh
installs and runs on macOS arm64 (curl, file://), Alpine (busybox wget,
root) and Ubuntu (curl, non-root to ~/.local/bin), and refuses a
tampered archive; the rendered formula passes brew style.
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@ecc-tools

ecc-tools Bot commented Nov 18, 2026

Copy link
Copy Markdown

ECC Tools / Security Evidence

Commit: 180d842d21991ff433451265cb1ef47bf981fb36

Security evidence gate passed (success)

No security-sensitive scanner-evidence gap detected.

Mode: enforce

Scanned 8 changed file(s). No missing scanner-evidence signal was detected.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 18, 2026

Copy link
Copy Markdown

ECC Tools / PR Risk Taxonomy

Commit: 180d842d21991ff433451265cb1ef47bf981fb36

PR taxonomy review recommended (neutral)

Detected 2 PR taxonomy bucket(s): Security Evidence, CI/CD Recommendation.

Scanned 8 changed file(s).

Roadmap taxonomy buckets:

Security Evidence

Security-sensitive changes should carry explicit scanner, code-scanning, or focused regression evidence.

Signals:

  • 1 security-sensitive path(s) changed

Paths:

  • .github/workflows/release.yml

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • CI workflow changes may ship without failure-mode evidence
  • Dependency or CI drift could surface after merge
  • 1 CI or workflow path(s) changed

Paths:

  • .github/workflows/release.yml

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 18, 2026

Copy link
Copy Markdown

ECC Tools / Reference Set Readiness

Commit: 180d842d21991ff433451265cb1ef47bf981fb36

Reference set readiness gaps detected (neutral)

Reference evidence present for 0/7 areas (0%) across 8 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Missing Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces.
Security evidence Missing Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs.
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T22:33:39.018591Z 180d842 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ecc-tools

ecc-tools Bot commented Nov 18, 2026

Copy link
Copy Markdown

ECC Tools / Hosted Promotion Readiness

Commit: 180d842d21991ff433451265cb1ef47bf981fb36

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 8 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Summary

Purpose

The change adds a tag-driven release path and an installer for ZigMap. Users can install prebuilt Linux and macOS binaries without building from source. The installer checks each download against SHA256SUMS before it installs anything.

Material changes

  • .github/workflows/release.yml (new, +73):
    • Triggers on v* tags.
    • publish job (ubuntu-latest, contents: write):
      • Checks the tag against pub const version in src/output/report.zig and .version in build.zig.zon.
      • Runs zig build test and zig build release.
      • Runs packaging/package.sh dist.
      • Extracts the x86_64 Linux archive and checks --version.
      • Runs gh release create "$TAG" dist/* with --verify-tag.
    • install job (needs publish; matrix of ubuntu-latest, ubuntu-24.04-arm, macos-latest):
      • Runs the checked-out install.sh with ZIGMAP_VERSION=$TAG and ZIGMAP_INSTALL_DIR=$RUNNER_TEMP/bin.
      • Checks --version and the --dry-run output.
    • Actions are pinned by commit SHA. Zig is pinned to 0.17.1. persist-credentials: false is set on checkout.
  • install.sh (new, +100):
    • POSIX sh. Maps uname output to linux or macos and x86_64 or aarch64.
    • Uses curl or wget to download the archive and SHA256SUMS.
    • Uses sha256sum or shasum to verify the archive. Exits on a missing entry or a mismatch.
    • Install directory: ZIGMAP_INSTALL_DIR if set. Otherwise /usr/local/bin if writable. Otherwise ~/.local/bin.
    • Copies the binary to a temporary file in the target directory, then renames it into place.
    • Never calls sudo. Prints PATH guidance and Linux capability guidance for -sS and -sU.
  • packaging/package.sh (new, +34): Builds zigmap-<arch>-<os>.tar.gz from each zig-out/release/zigmap-* file. Each archive contains zigmap and README.md. Uses sorted names, --owner=0 --group=0 --numeric-owner, a fixed mtime from SOURCE_DATE_EPOCH or the HEAD commit time, and gzip -n -9. Writes SHA256SUMS. Requires GNU tar and sha256sum. Fails when no binaries exist.
  • packaging/homebrew/render-formula.sh (new, +75): Renders a Homebrew formula for the mcaney006/homebrew-zigmap tap from a release's SHA256SUMS. Not inspected in this review. The behavior described here comes from the AI-generated summary.
  • build.zig.zon: Version changed from 0.1.0 to 0.2.0. This matches the tag check in the workflow.
  • README.md (+26), docs/releasing.md (+21), .gitignore (+1): Install instructions, release procedure, and dist/ ignore rule.

Execution flow

  1. Maintainer pushes vX.Y.Z after aligning versions and merging to main.
  2. publish validates the tag, runs tests, builds release binaries, packages them, and runs a smoke test on the x86_64 Linux archive.
  3. publish creates the GitHub release with the archives and SHA256SUMS. The release becomes public at this step.
  4. install runs on three runners. Each runner downloads the release asset for its platform, verifies the checksum, installs to the temporary directory, and checks the version and dry-run output.
  5. Users run install.sh (curl or wget), which follows the same download, verify, and install steps.

Risk assessment

Category Rating Basis
Correctness Medium The installer logic is straightforward. The release gate runs only after the release is public, so a failed install job leaves a published release that fails verification.
Memory safety and undefined behavior Low Shell and YAML only. No compiled code changed.
Concurrency and synchronization Low concurrency uses cancel-in-progress: false. The install step writes to a unique temp file and renames it atomically within the same directory.
Security and credential handling Medium Least privilege is set: contents: read by default, contents: write only on publish, persist-credentials: false, and SHA-pinned actions. SHA256SUMS comes from the same release as the archive. This detects corruption and tampering only if the attacker cannot alter the release. No signature is used.
Performance and resource usage Low Small scripts. Runners are short-lived.
Reliability and recovery Medium gh release create fails if the release already exists, so a partial failure requires manual cleanup before a tag re-run. Install-directory failures are caught by the writability check. cp failure can leave a partial .zigmap.new.$$ file, because the EXIT trap removes only $tmp.
Backward compatibility Low No existing interfaces changed. build.zig.zon version changed to 0.2.0.
Deployment and rollback Medium No automated rollback. A bad release requires deleting the GitHub release and tag by hand. The workflow cannot run for this change until a tag is pushed.

Validation

  • Present in source:
    • Tag and version consistency check in publish.
    • zig build test and zig build release in CI.
    • Smoke test of the packaged x86_64 Linux binary.
    • Post-publish install and dry-run checks on three platforms.
  • Author-reported, not verified here:
    • Two packaging runs produced identical SHA256SUMS.
    • Installation and execution worked on macOS arm64 with curl and file://, Alpine with BusyBox wget as root, and Ubuntu with curl as a non-root user.
    • A tampered archive was refused.
    • The rendered formula passed brew style.
  • Not available: No completed CI run for this change was supplied. The release workflow has not executed.
  • Missing evidence:
    • No test coverage for install.sh error paths in the repository.
    • No checks on render-formula.sh.
    • No compiler, sanitizer, or static analysis output for the shell scripts. No ShellCheck result was supplied.

Operational impact

  • Configuration and environment variables:
    • ZIGMAP_VERSION, ZIGMAP_INSTALL_DIR, and ZIGMAP_BASE_URL for install.sh.
    • SOURCE_DATE_EPOCH for package.sh.
    • HOME must be set when the default user directory is used.
  • Network: HTTPS access to github.com release URLs. ZIGMAP_BASE_URL can point to a mirror.
  • Filesystem: Writes to /usr/local/bin only when writable, otherwise ~/.local/bin. Creates the target directory when missing.
  • Privileges: No sudo. -sS and -sU on Linux need root or CAP_NET_RAW. The installer prints the setcap command. It does not run it.
  • Tooling: The release job needs GNU tar and sha256sum on Ubuntu. Installation needs curl or wget, tar, awk, mktemp, cp, and mv, plus sha256sum or shasum.
  • Migration and schema: None.
  • Rollback: Delete the GitHub release and tag. Users keep the previous binary until they reinstall. Installing an older tag with ZIGMAP_VERSION restores that version.

The changes add version 0.2.0 release packaging, a tag-triggered GitHub release workflow, and installation options for Linux and macOS. The workflow checks versions, tests and packages the binaries, publishes release assets, and verifies installation on Ubuntu and macOS runners.

Changes: Release and Distribution

Layer / File(s) Summary
Versioned package artifacts
build.zig.zon, packaging/package.sh, .gitignore
The package version changes from 0.1.0 to 0.2.0. The packaging script creates normalized archives containing each release binary and the README, then writes checksums. dist/ is ignored.
Tag-triggered release workflow
.github/workflows/release.yml, docs/releasing.md
The workflow validates the tag against declared versions, runs tests, builds and packages binaries, publishes a GitHub release, and checks installation on Ubuntu x86_64, Ubuntu ARM64, and macOS. The release guide documents the process and Homebrew publication steps.
Installer and Homebrew distribution
install.sh, packaging/homebrew/render-formula.sh, README.md
The installer selects supported platform assets, verifies checksums, and installs to a selected directory. The formula generator uses release checksums to generate a platform-selecting formula with installation caveats and tests. The README documents installation methods and scan privilege requirements.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant TagPush
  participant ReleaseWorkflow
  participant package_sh
  participant GitHubRelease
  participant InstallVerification
  participant install_sh
  TagPush->>ReleaseWorkflow: Trigger workflow for v* tag
  ReleaseWorkflow->>package_sh: Build and package release binaries
  package_sh-->>ReleaseWorkflow: Archives and SHA256SUMS
  ReleaseWorkflow->>GitHubRelease: Publish release assets
  InstallVerification->>install_sh: Install tagged release on each runner
  install_sh->>GitHubRelease: Download archive and SHA256SUMS
  InstallVerification->>InstallVerification: Check version and dry-run output
Loading
Merge Risk: Low · up to 180d8

The installer can print a success message even when the installed binary cannot run, for example on a noexec mount. The standalone packaging script can also report success with an unusable archive when tar fails. Both are narrow and have simple fixes, and the release workflow's checks reduce the packaging risk, so the PR is mergeable with these two small follow-ups.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A tag wakes the build machine
Four archives line up in rows
Checksums keep the ledgers straight
Small installers cross the maps
The dry run sends no packets
Release gears click, then rest

@ecc-tools

ecc-tools Bot commented Nov 18, 2026

Copy link
Copy Markdown

ECC Tools / PR Config Audit

Commit: 180d842d21991ff433451265cb1ef47bf981fb36

No changed-config issues detected (success)

Scanned 1 config file(s) present at this commit across 1 changed config path(s) and found no issues in the supported security rules.

Changed config files:

  • .github/workflows/release.yml

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 18, 2026

Copy link
Copy Markdown

ECC Tools / PR Harness Audit

Commit: 180d842d21991ff433451265cb1ef47bf981fb36

No harness issues detected (success)

Scanned 1 changed config file(s) and found no harness issues.

Changed config files:

  • .github/workflows/release.yml

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@gitar-bot

gitar-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@mcaney006
mcaney006 merged commit 1503c02 into main Nov 18, 2026
8 of 9 checks passed
@mcaney006
mcaney006 deleted the install-brew-curl branch November 18, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant