From 9eb70b465514eb71fbe05acecdb990e1202fdcf1 Mon Sep 17 00:00:00 2001 From: Giovanni Ferri Date: Sun, 2 Aug 2026 15:27:57 +0100 Subject: [PATCH] Fix bpm-tray release archive: binary must be named plain bpm-tray Real bug found integrating the Homebrew formula: the tray tarball's internal binary was named bpm-tray_vX_darwin_arch (matching the archive's own filename), not plain bpm-tray, so Formula bin.install "bpm-tray" failed with ENOENT on real brew install. goreleaser's own bpm archives don't have this problem because its archive template only versions the .tar.gz filename, not the binary inside. Fixed by building into a per-arch staging dir and tarring from inside it, so only the .tar.gz filename is versioned. Verified locally: tar -tzf now lists a bare bpm-tray entry. Also restructured the README's Getting Started to lead with three actual run methods (Homebrew, Docker, from-source-as-fallback) and folded the menu bar app into the Homebrew section, since brew install now installs bpm-tray too on macOS. --- .github/workflows/release.yml | 13 ++++++++----- README.md | 26 ++++++++++++-------------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de461a8..ce00e92 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,12 +43,15 @@ jobs: go-version: "1.25" - name: Build bpm-tray for both Apple Silicon and Intel run: | - mkdir -p dist-tray + # Binary inside the archive stays plain "bpm-tray" (only the + # .tar.gz filename is versioned) so the Homebrew formula's + # `bin.install "bpm-tray"` finds it - matches how goreleaser's own + # archives contain a plain "bpm", not "bpm_vX_os_arch". for arch in arm64 amd64; do - name="bpm-tray_${{ github.ref_name }}_darwin_${arch}" - CGO_ENABLED=1 GOARCH=$arch go build -o "dist-tray/$name" ./cmd/bpm-tray - tar -C dist-tray -czf "dist-tray/${name}.tar.gz" "$name" - rm "dist-tray/$name" + dir="dist-tray/darwin_${arch}" + mkdir -p "$dir" + CGO_ENABLED=1 GOARCH=$arch go build -o "$dir/bpm-tray" ./cmd/bpm-tray + tar -C "$dir" -czf "dist-tray/bpm-tray_${{ github.ref_name }}_darwin_${arch}.tar.gz" bpm-tray done - name: Attach to the release env: diff --git a/README.md b/README.md index 3b5f8b4..dc00267 100644 --- a/README.md +++ b/README.md @@ -24,16 +24,24 @@ Bambu Studio stores your filament and print settings as profiles that inherit fr ## Getting started -Pick whichever install method is easiest for you. +Three ways to run it — pick whichever fits: -**Homebrew (macOS/Linux):** +**1. Homebrew (macOS/Linux, recommended):** ```bash brew install syscode-labs/public/bpm bpm serve --db bpm.db --addr :8080 ``` -**From source (requires Go 1.25+):** +On macOS this also installs `bpm-tray` — a menu bar app that runs the same web UI as a small icon instead of a terminal command, and finds your real Bambu Studio directories on its own (no flags needed). Just run `bpm-tray` once; click its icon to open the web UI or quit. `make tray` builds it from source instead, or grab it standalone from the [latest release](https://github.com/syscode-labs/bambu-profile-manager/releases/latest) if you're not using Homebrew. + +**2. Docker:** + +```bash +docker compose up --build +``` + +**3. From source (fallback, requires Go 1.25+):** ```bash git clone https://github.com/syscode-labs/bambu-profile-manager.git @@ -42,20 +50,10 @@ make install # builds bpm and puts it on your PATH bpm serve --db bpm.db --addr :8080 ``` -Run `make help` to see every other command (`build`, `test`, `run`, `docker`, `clean`). - -**Docker:** - -```bash -docker compose up --build -``` +Run `make help` to see every other command (`build`, `test`, `run`, `tray`, `docker`, `clean`). Whichever way you start it, open `http://localhost:8080`. Listing, viewing, and importing profiles works right away. To copy profiles between printers or restore a backup, add `--user-dir`/`--system-dir` (filament) and `--process-user-dir`/`--process-system-dir` (process/print) pointing at your real Bambu Studio directories — see the in-app **Help** page for exactly where those live and what each flag does. -**macOS menu bar app:** - -`bpm-tray` runs the same web UI as a small icon in your menu bar instead of a terminal command — no flags to remember, it finds your real Bambu Studio directories on its own. Download it from the [latest release](https://github.com/syscode-labs/bambu-profile-manager/releases/latest), or build it yourself with `make tray`. Click the icon to open the web UI or quit. - ## Day-to-day usage Everything below also works through the web UI — the CLI is for scripting or running headless.