Skip to content

fix: brew formula stuck at v0.3.1, version normalization broken in publish pipeline #285

Description

@anandgupta42

Problem

Multiple installation issues:

  1. Homebrew formula stuck at v0.3.1Script.version includes the v prefix from git tags, causing double-v URLs (vv0.4.9) in the brew formula. The brew publish fails silently (wrapped in try/catch).
  2. npm EEXIST error (reported in [Bug] npm install not working on the unscoped altimate-code #276) — bin conflict between brew and npm installs at /opt/homebrew/bin/altimate
  3. Brew latest() fallback dead — falls back to formulae.brew.sh which 404s since we're not in core homebrew
  4. npm optionalDependencies have v-prefixed versions (technically invalid semver)

Root Cause

packages/script/src/index.ts line 35 passes OPENCODE_VERSION (git tag e.g. v0.4.9) verbatim without stripping the v prefix. All downstream consumers (brew formula, AUR, npm, Docker) get broken versions.

Fix

  1. Strip v prefix at the source in Script.version
  2. Replace dead formulae.brew.sh fallback with brew info --json=v2 then GitHub releases API
  3. Add 64 new tests for version normalization, brew formula, and upgrade method detection

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions