Skip to content

Publish Linux release artifacts + self-heal installer versioning (fixes #56) - #57

Open
Mineru98 wants to merge 3 commits into
Ouro-labs:release/bootstrapfrom
Mineru98:feat/linux-support
Open

Publish Linux release artifacts + self-heal installer versioning (fixes #56)#57
Mineru98 wants to merge 3 commits into
Ouro-labs:release/bootstrapfrom
Mineru98:feat/linux-support

Conversation

@Mineru98

Copy link
Copy Markdown
Collaborator

Summary

Fixes the documented Linux install failure in #56. The curl -fsSL .../release/bootstrap/install.sh | bash quick start returns HTTP 404 on Linux because releases only ship a darwin-arm64 tarball — no Linux asset exists, there is no release CI, and install.sh pins a stale hardcoded version.

Changes

  • .github/workflows/release.yml (new): on release: published (and workflow_dispatch for a dry run), build tarballs on native runners and attach them to the Release.
    • Matrix: ubuntu-latestlinux-x86_64, ubuntu-24.04-armlinux-arm64 (continue-on-error), macos-14darwin-arm64.
    • Checks out the release tag, guards tag == mix.exs version (fail-fast), runs the existing scripts/package.sh, and uploads idempotently via softprops/action-gh-release. workflow_dispatch uploads workflow artifacts instead (no publish).
  • install.sh:
    • resolve_version()OUROCODE_VERSION › source-checkout mix.exs › bootstrap latest release tag (portable parse, no jq) › pinned fallback. Removes the hardcoded 0.1.13 drift.
    • Missing-asset handling: an actionable error (platform + OUROCODE_REPO/OUROCODE_RELEASE_URL hints + source-build guidance) instead of a bare curl: (22).
    • Opt-in source fallback: only when OUROCODE_BUILD_FROM_SOURCE=1 (a pipe install clones the resolved tag, then builds); no surprise clones by default.
  • README.md: reflect Linux support (line 9 phrasing, Requirements platform note, Package A Release artifacts + CI note).

scripts/package.sh and docs/product-vision.md are intentionally unchanged (package.sh already derives the version from mix.exs and maps arch per host; the "optimized for macOS" phrase lived in README).

Verification (Linux x86_64)

  • bash -n install.sh scripts/package.sh — OK; workflow YAML validated (pyyaml): 3 platforms / 3 runners / release + workflow_dispatch / 9 steps.
  • resolve_version() all 4 paths, incl. a real GitHub API latest-tag call → 0.1.14.
  • Missing-asset path (404 release URL): actionable error + exit 1, default does not build from source (opt-in respected).
  • Full e2e (Elixir 1.17.3/OTP 27 + cargo 1.97): scripts/package.shourocode-v0.1.14-linux-x86_64.tar.gz + .sha256 (shasum -c OK) → install.sh (bundled binaries) → ourocode --detect runs (exit 0).

The workflow_dispatch dry-run and real publish run on GitHub-hosted runners (maintainer-owned); the build step they invoke (package.sh) is proven end-to-end above.

Non-goals

Bundling Erlang/OTP, a self-contained binary, package-manager distribution, code signing, Windows (#39), and linux-arm64 local e2e.

Closes #56

…ning

Fixes the documented `curl ... install.sh | bash` 404 on Linux (Ouro-labs#56): the
release only shipped darwin-arm64 tarballs, there was no release CI, and
install.sh pinned a stale hardcoded version.

- add .github/workflows/release.yml: on release:published + workflow_dispatch,
  build linux-x86_64 / linux-arm64 / darwin-arm64 tarballs (+sha256) on native
  runners (ubuntu-latest / ubuntu-24.04-arm / macos-14), checkout the release
  tag, guard tag==mix.exs, and upload idempotently
- install.sh: resolve_version() (OUROCODE_VERSION > mix.exs > latest release
  tag), drop hardcoded 0.1.13; actionable error on missing asset instead of a
  bare curl 22; opt-in OUROCODE_BUILD_FROM_SOURCE source fallback
- README: reflect Linux support (Requirements, Package A Release)

Refs Ouro-labs#56
`ourocode --version` reported 0.1.13 while mix.exs was 0.1.14 (found while
installing on Linux). Derive @Version from Mix.Project.config() at compile
time so the CLI version can never drift from the package version again, and
make the CLI version test assert against the mix.exs version instead of a
hardcoded literal. (ACP already derives its version from the app spec.)

Refs Ouro-labs#56
@Mineru98

Copy link
Copy Markdown
Collaborator Author

Follow-up commit 7e14a08: while installing on Linux I noticed ourocode --version printed 0.1.13 while mix.exs is 0.1.14 — the same version-drift class this PR targets, in lib/ourocode/cli.ex (@version was hardcoded). Fixed by deriving @version from Mix.Project.config()[:version] at compile time, and updated the CLI version test to assert against the mix.exs version instead of a literal so it can't drift again. (The ACP layer already derives its version from the app spec, so no change needed there.)

Verified after the fix: rebuilt escript, reinstalled to ~/.local, ourocode --version0.1.14, mix test test/ourocode/cli_test.exs:181 passes.

…rsion

Carries the release-path fixes validated by cutting a real pre-release:
- release.yml: add a windows-latest job that runs scripts/package-windows.ps1
  and attaches ourocode-v<version>-windows-x64.zip(.sha256), so tagging a
  release actually ships a Windows artifact.
- scripts/package.sh: hash the bare filename instead of $TARBALL's absolute
  path, so the shipped .sha256 verifies with `sha256sum -c` after download.
- install.sh: derive the version from the ourocode-v<version>-<os>-<arch>
  directory when installing an unpacked tarball, instead of falling through to
  the pinned fallback and installing beta bits into a 0.1.14 directory. Also
  default release downloads to Ouro-labs/ourocode and document the fallback.
- README: Ouro-labs install URLs, Windows zip, and how to opt into a beta.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mineru98 added a commit to Mineru98/ourocode that referenced this pull request Jul 22, 2026
The Ouro-labs URL fix is already carried by Ouro-labs#57, which owns the release/docs
section; keeping a duplicate copy here only makes README conflict at merge.
install.ps1's repo default (the functional fix) stays.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Publish Linux release artifacts so the documented install path works

1 participant