Skip to content

v0.4.0 — the refactor

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Jul 21:37
8b5967c

v0.4.0 — the refactor 🧹

go-disc-cuer is a CLI tool and reusable Go package to generate CUE files from audio CDs, with metadata enrichment from GNUDB and MusicBrainz.

This release delivers the internals cleanup promised in v0.3.0: a new injectable Generator API, a testable disc seam, full CI, and a proper release pipeline — with no change to the CLI surface.

✨ Highlights

  • New Generator APIcue.New(cfg, ...Option).Generate(Options) replaces the old generate variants. Dependencies (drive, metadata source) are now injected per-Generator instead of through package-level vars, so the whole flow is testable without hardware or network.
  • Disc access abstracted behind the utils.Disc interface, enabling end-to-end tests that drive Generate from a canned TOC (no drive required).
  • Stampable versionconfig.AppVersion is now a var (default "dev") that builds can set via -ldflags -X; library consumers keep overriding it through NewConfig.

🐛 Fixes

  • gnudb: rejoin TTITLE lines wrapped across multiple lines (#9).
  • musicbrainz: guard convertReleaseToDiscInfo against empty data.
  • log: trace request URLs and redact the email-bearing hello= param from GNUDB URLs before logging.

🏗️ Tooling

  • Makefile (deps / build / dist / test / lint / …) with a git-stamped version.
  • GitHub Actions: CI running build, go test -race and golangci-lint on every push and PR, plus a release workflow that publishes the linux/amd64 artifact on tag push.

🎛️ CLI flags (unchanged)

  • --overwrite — regenerate the CUE file even if it already exists
  • --musicbrainz <release_id> — force a specific MusicBrainz release for metadata
  • --disc-id <disc_id> — supply a custom disc ID (requires --musicbrainz)
  • --device <device> — override the disc drive (default /dev/sr0)

📦 Install

git clone https://github.com/b0bbywan/go-disc-cuer.git
cd go-disc-cuer
# Debian/Ubuntu
sudo apt install libdiscid0 libdiscid-dev
# Fedora
sudo dnf install libdiscid libdiscid-devel
make build   # or: go build -o disc-cuer .

A prebuilt disc-cuer-linux-amd64 binary is attached below.


Full changelog: v0.3.0...v0.4.0