take.sh builds arr-tui, starts a fake Radarr, Sonarr and SABnzbd with a made-up library (catalog.py, server.py, generated posters), and runs the scene scripts in Ghostty under Xvfb, writing docs/screenshots/. Run on the same day it reproduces the committed pictures byte for byte. make test also shellchecks the scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019reK4DUGYqDUjniWYJvwUW
32 lines
1.0 KiB
Makefile
32 lines
1.0 KiB
Makefile
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
|
|
LDFLAGS := -s -w -X main.version=$(VERSION)
|
|
TARGETS := linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64
|
|
|
|
.PHONY: build test dist release clean
|
|
|
|
build:
|
|
go build -ldflags '$(LDFLAGS)' -o arr-tui ./cmd/arr-tui
|
|
|
|
test:
|
|
go vet ./...
|
|
go test ./...
|
|
@if command -v shellcheck >/dev/null; then shellcheck scripts/*.sh dev/*.sh dev/screenshots/*.sh; else echo "shellcheck not installed, skipping shell script checks"; fi
|
|
|
|
# Cross-compiled binaries and checksums in dist/.
|
|
dist:
|
|
rm -rf dist && mkdir dist
|
|
@for t in $(TARGETS); do \
|
|
os=$${t%/*}; arch=$${t#*/}; ext=; [ $$os = windows ] && ext=.exe; \
|
|
echo "building $$os/$$arch"; \
|
|
CGO_ENABLED=0 GOOS=$$os GOARCH=$$arch go build -trimpath -ldflags '$(LDFLAGS)' \
|
|
-o dist/arr-tui-$$os-$$arch$$ext ./cmd/arr-tui || exit 1; \
|
|
done
|
|
cd dist && sha256sum arr-tui-* > SHA256SUMS
|
|
|
|
# Publish the release for the tag at HEAD on Gitea (see scripts/release.sh).
|
|
release:
|
|
scripts/release.sh
|
|
|
|
clean:
|
|
rm -rf dist arr-tui
|