From cca1acd9c1e92096b13c86c366fed0e0d379bcdf Mon Sep 17 00:00:00 2001 From: Geoffrey Grosenbach <26+topfunky@users.noreply.github.com> Date: Thu, 22 Jan 2026 05:52:04 +0000 Subject: [PATCH] make: add gifs task with dependency tracking Uses a pattern rule to only regenerate GIFs when the matching .tape file is newer. --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4e48e30..59e61f9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: default build test format lint install-deps clean run snapshot release-local ci-local +.PHONY: default build test format lint install-deps clean run snapshot release-local ci-local gifs VERSION := $(shell git describe --tags --always) LDFLAGS := -X 'main.version=$(VERSION)' @@ -52,3 +52,13 @@ release-local: # Run CI locally using act ci-local: sudo -i bash -c "cd /home/dev/projects/countdown && act --job lint && act --job test" + +# Generate GIFs from VHS tape files +TAPES := $(wildcard vhs/*.tape) +GIFS := $(TAPES:.tape=.gif) + +gifs: $(GIFS) + +vhs/%.gif: vhs/%.tape + @echo "Generating GIF from $<..." + docker run --rm -v $$(pwd):/vhs $$(docker build -q vhs) $<