almnck/Makefile

28 lines
910 B
Makefile
Raw Normal View History

.PHONY: default
default:
@echo "Please specify a target to run, e.g., 'make live' for live deployment."
# Define a common rule to check if ALMANACK_ROOT is set
.PHONY: check-activated
check-activated:
ifndef ALMANACK_ROOT
$(error ALMANACK_ROOT is undefined. Please run `source bin/a-activate` before running any targets.)
endif
# Define the 'live' target which will be triggered on 'make live'
2024-01-04 23:43:17 -08:00
RSYNC_OPTS := -avz --delete -e "a-ssh"
DEST1 := boat:/var/local/www/www.almnck.com/
DEST2 := amsterdam:/var/local/www/www.almnck.com/
DEST3 := phoenix:/home/danny/www/www.almnck.com/
.PHONY: live
live: check-activated
2024-01-04 23:43:17 -08:00
@rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(DEST1)
@rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(DEST2)
@rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(DEST3)
2023-12-13 00:10:12 -08:00
.PHONY: test-doc
test-doc: check-activated
2023-12-13 00:10:12 -08:00
@echo Running doc-check-links
@sh $(ALMANACK_ROOT)/src/tests/doc-check-links | tapview