notes.velouria.dev/Makefile

25 lines
687 B
Makefile

.DEFAULT_GOAL := help
# Load environment variables from .env file
include .env
help:
@echo "Available targets:"
@echo " publish Restart Docker Compose (or run 'npx quartz build --serve' with local=True)."
@echo " preview Run 'npx quartz build --serve' with specific directories."
compress-images:
@./scripts/compress_images.sh
# Target-specific variables for the publish target
publish:
@./scripts/publish.sh "$(SOURCE_DIR)" "$(DEST_DIR)"
@if [ "$(local)" = "True" ]; then \
echo "Running npx quartz build --serve"; \
npx quartz build --serve; \
@./scripts/compress_images.sh; \
else \
echo "Restarting Docker Compose"; \
docker compose restart; \
fi