2023-12-12 22:13:10 -08:00
|
|
|
.PHONY: default
|
|
|
|
|
default:
|
|
|
|
|
@echo "Please specify a target to run, e.g., 'make live' for live deployment."
|
|
|
|
|
|
2023-12-13 01:03:47 -08:00
|
|
|
# Define a common rule to check if ALMANACK_ROOT is set
|
|
|
|
|
.PHONY: check-activated
|
|
|
|
|
check-activated:
|
2023-12-12 22:13:10 -08:00
|
|
|
ifndef ALMANACK_ROOT
|
2023-12-13 01:03:47 -08:00
|
|
|
$(error ALMANACK_ROOT is undefined. Please run `source bin/a-activate` before running any targets.)
|
2023-12-12 22:13:10 -08:00
|
|
|
endif
|
2023-12-13 01:03:47 -08:00
|
|
|
|
|
|
|
|
# Define the 'live' target which will be triggered on 'make live'
|
|
|
|
|
RSYNC_OPTS := -avz --delete
|
|
|
|
|
DEST := boat:/var/local/www/www.almnck.com/
|
|
|
|
|
.PHONY: live
|
|
|
|
|
live: check-activated
|
|
|
|
|
@rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(DEST)
|
2023-12-13 00:10:12 -08:00
|
|
|
|
|
|
|
|
.PHONY: test-doc
|
2023-12-13 01:03:47 -08:00
|
|
|
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
|
|
|
|
|
|