diff --git a/Makefile b/Makefile index e744935..3366425 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ help: @echo "make images — convert content/images/*.jpg → WebP" @echo "make artists — regenerate artists.json from audio.yaml" @echo "make content — artists + images + audio" + @echo "make deploy-assets — rsync web/static/{audio,images}/ to sprade for production" @echo "make tag V=patch|minor|major — bump version tag and push" @echo "make prefetch — print sha256 + npmDepsHash + vendorHash for the homelab module" @@ -31,6 +32,17 @@ artists: .PHONY: content content: artists images audio +.PHONY: deploy-assets +deploy-assets: + @if [ ! -d web/static/audio ] || [ -z "$$(ls web/static/audio 2>/dev/null)" ]; then \ + echo "error: web/static/audio is empty. Run \`make audio\` first." >&2; exit 1; \ + fi + @if [ ! -d web/static/images ] || [ -z "$$(ls web/static/images 2>/dev/null)" ]; then \ + echo "error: web/static/images is empty. Run \`make images\` first." >&2; exit 1; \ + fi + rsync -av --delete --progress web/static/audio/ deploy@sprade:/var/lib/docent/audio/ + rsync -av --delete --progress web/static/images/ deploy@sprade:/var/lib/docent/images/ + .PHONY: build build: cd web && npm install && npm run build