Operators no longer have to install ffmpeg manually. Both the release
tarballs (5 platforms × 2 binaries) and the Docker image now ship a
working ffmpeg + ffprobe pair adjacent to the unarr binary;
ResolveFFmpeg / ResolveFFprobe pick them up via the "adjacent to
executable" branch with zero configuration.
Tarball bundle (scripts/download-ffmpeg-static.sh + .goreleaser.yml):
- ffbinaries.com (johnvansickle / Zeranoe-style static GPL builds) for
linux-amd64, linux-arm64, darwin-amd64, windows-amd64
- evermeet.cx universal Mach-O for darwin-arm64 (ffbinaries lacks it)
- BtbN/FFmpeg-Builds for windows-arm64 (ffbinaries lacks it)
- Idempotent fetch with curl --retry 5 so transient github.com SSL
errors don't fail the goreleaser before-hook
- New `before.hooks` runs the script automatically per release; archive
files glob `dist-ffbinaries/{{ .Os }}-{{ .Arch }}/*` + strip_parent
- Migrated to non-deprecated `formats: [tar.gz]` / `formats: [zip]`
- Verified via `goreleaser release --snapshot --clean --skip=publish` —
6 archives all carry ffmpeg + ffprobe (~60-130MB each)
Docker image (Dockerfile):
- Replaced the failing BtbN static glibc binaries with Alpine's native
musl `apk add ffmpeg`. The static GPL builds need glibc + libmvec /
libgcc_s; gcompat alone is not enough (vector-math symbols unresolved).
Alpine ships ffmpeg 6.1.2 which is fine for the WebRTC transcoder.
- Image size 174MB, built + ffmpeg/ffprobe/unarr smoke OK.
Targets the v0.8 unarr release (per user direction — new feature, not
a patch). dist-ffbinaries/ added to .gitignore.
70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
version: 2
|
|
|
|
project_name: unarr
|
|
|
|
# Pre-build hook: fetch static ffmpeg + ffprobe per platform so each
|
|
# release tarball ships them adjacent to the unarr binary. ResolveFFmpeg /
|
|
# ResolveFFprobe pick them up via the "adjacent to executable" branch — no
|
|
# system install or runtime download needed.
|
|
before:
|
|
hooks:
|
|
- bash scripts/download-ffmpeg-static.sh
|
|
|
|
builds:
|
|
- main: ./cmd/unarr/
|
|
binary: unarr
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- darwin
|
|
- windows
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
ldflags:
|
|
- -s -w
|
|
- -X github.com/torrentclaw/unarr/internal/cmd.Version={{.Version}}
|
|
- -X github.com/torrentclaw/unarr/internal/sentry.dsn={{ .Env.SENTRY_DSN }}
|
|
|
|
archives:
|
|
- formats: [tar.gz]
|
|
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
|
format_overrides:
|
|
- goos: windows
|
|
formats: [zip]
|
|
files:
|
|
- LICENSE*
|
|
- README*
|
|
# Bundle the matching ffmpeg + ffprobe (filename includes .exe on Windows
|
|
# because download-ffmpeg-static.sh writes ffmpeg.exe / ffprobe.exe there).
|
|
- src: "dist-ffbinaries/{{ .Os }}-{{ .Arch }}/*"
|
|
dst: .
|
|
strip_parent: true
|
|
info:
|
|
mode: 0o755
|
|
|
|
checksum:
|
|
name_template: "checksums.txt"
|
|
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
- "^docs:"
|
|
- "^test:"
|
|
- "^chore:"
|
|
|
|
# Homebrew tap — requires PAT with repo scope (not GITHUB_TOKEN)
|
|
# Enable when torrentclaw/homebrew-tap PAT is configured as HOMEBREW_TAP_TOKEN
|
|
# brews:
|
|
# - repository:
|
|
# owner: torrentclaw
|
|
# name: homebrew-tap
|
|
# token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
|
|
# name: unarr
|
|
# homepage: https://github.com/torrentclaw/unarr
|
|
# description: "unarr — replaces the entire *arr stack"
|
|
# license: MIT
|
|
# install: |
|
|
# bin.install "unarr"
|