Compare commits
No commits in common. "39035e3d2cf9c035e98e32a9bfdb7327b416b9e0" and "cb37f7c79bc85810e2415541cc16635175616814" have entirely different histories.
39035e3d2c
...
cb37f7c79b
4 changed files with 13 additions and 30 deletions
25
Makefile
25
Makefile
|
|
@ -1,16 +1,6 @@
|
||||||
RED := \033[0;31m
|
|
||||||
GREEN := \033[0;32m
|
|
||||||
YELLOW := \033[0;33m
|
|
||||||
BLUE := \033[0;34m
|
|
||||||
MAGENTA := \033[0;35m
|
|
||||||
CYAN := \033[0;36m
|
|
||||||
WHITE := \033[0;37m
|
|
||||||
BOLD := \033[1m
|
|
||||||
RESET := \033[0m
|
|
||||||
|
|
||||||
.PHONY: default
|
.PHONY: default
|
||||||
default:
|
default:
|
||||||
@echo "$(RED)Please specify a target to run, e.g., 'make live' for live deployment.$(RESET)"
|
@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
|
# Define a common rule to check if ALMANACK_ROOT is set
|
||||||
.PHONY: check-activated
|
.PHONY: check-activated
|
||||||
|
|
@ -21,15 +11,14 @@ endif
|
||||||
|
|
||||||
# Define the 'live' target which will be triggered on 'make live'
|
# Define the 'live' target which will be triggered on 'make live'
|
||||||
RSYNC_OPTS := -avz --delete --delete-after --filter='dir-merge,-n /.gitignore' -e "a-ssh"
|
RSYNC_OPTS := -avz --delete --delete-after --filter='dir-merge,-n /.gitignore' -e "a-ssh"
|
||||||
DESTINATIONS := boat:/var/local/www/www.almnck.com/ dallas:/var/local/www/www.almnck.com/ sj:/var/local/www/www.almnck.com/
|
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
|
.PHONY: live
|
||||||
live: check-activated
|
live: check-activated
|
||||||
@test -d "$(ALMANACK_ROOT)/web" || (echo "ERROR: web directory not found" && exit 1)
|
@rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(DEST1)
|
||||||
@echo "Dry run preview:"
|
@rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(DEST2)
|
||||||
@$(foreach dest,$(DESTINATIONS),echo "$(BLUE)To $(dest)$(RESET)"; rsync $(RSYNC_OPTS) --dry-run $(ALMANACK_ROOT)/web/ $(dest);)
|
@rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(DEST3)
|
||||||
@read -p "Continue with deployment? (y/N): " confirm && [ "$$confirm" = "y" ]
|
|
||||||
@$(foreach dest,$(DESTINATIONS),echo "$(BLUE)To $(dest)$(RESET)"; rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(dest);)
|
|
||||||
|
|
||||||
.PHONY: test-doc
|
.PHONY: test-doc
|
||||||
test-doc: check-activated
|
test-doc: check-activated
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ web -- the contents of our (static, public) website.
|
||||||
secrets -- passwords, PII, etc. Assume everything else could be made public. If it would be existentially bad for it to leak, encrypt it, and put it here.
|
secrets -- passwords, PII, etc. Assume everything else could be made public. If it would be existentially bad for it to leak, encrypt it, and put it here.
|
||||||
doc -- documentation of processes, ideas, memos, etc.
|
doc -- documentation of processes, ideas, memos, etc.
|
||||||
llc -- corporate documents, financial ledger, business running.
|
llc -- corporate documents, financial ledger, business running.
|
||||||
.venv -- python environment for this whole kiboodle.
|
venv -- python environment for this whole kiboodle.
|
||||||
|
|
||||||
To set up an environment that works with these scripts, start a shell
|
To set up an environment that works with these scripts, start a shell
|
||||||
(preferably zsh, though bash should work) in this directory, and type:
|
(preferably zsh, though bash should work) in this directory, and type:
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,13 @@ fi
|
||||||
declare -x ALMANACK_ROOT=$(dirname $script_dir)
|
declare -x ALMANACK_ROOT=$(dirname $script_dir)
|
||||||
|
|
||||||
# Check for the existence of the venv directory
|
# Check for the existence of the venv directory
|
||||||
if [ ! -d "$ALMANACK_ROOT/.venv" ]; then
|
if [ ! -d "$ALMANACK_ROOT/venv" ]; then
|
||||||
echo "The virtual environment directory does not exist. Please run:"
|
echo "The virtual environment directory does not exist. Please run:"
|
||||||
echo "python -m venv $ALMANACK_ROOT/.venv --prompt almnck"
|
echo "python -m venv $ALMANACK_ROOT/venv --prompt almnck"
|
||||||
return 1 2>/dev/null || exit 1
|
return 1 2>/dev/null || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. $ALMANACK_ROOT/.venv/bin/activate
|
. $ALMANACK_ROOT/venv/bin/activate
|
||||||
PATH=$ALMANACK_ROOT/bin:$PATH
|
PATH=$ALMANACK_ROOT/bin:$PATH
|
||||||
|
|
||||||
# Default to going to the root of almanack
|
# Default to going to the root of almanack
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
* Footnotes
|
* Footnotes
|
||||||
** Capitalism
|
** Capitalism
|
||||||
Capitalism, Effectiveness of: "Capitalism: Good, Bad, Indifferent, or Just More Lombardy Flimflam?", Giovanni Battista Fuggero, Almnck. 1389.
|
|
||||||
** Communism
|
** Communism
|
||||||
** Authoritarianism
|
** Authoritarianism
|
||||||
** Centralization
|
** Centralization
|
||||||
|
|
@ -23,11 +22,6 @@ Capitalism, Effectiveness of: "Capitalism: Good, Bad, Indifferent, or Just More
|
||||||
** Cryptography
|
** Cryptography
|
||||||
** Privacy
|
** Privacy
|
||||||
** Surveillance
|
** Surveillance
|
||||||
** Atheism and Woo
|
|
||||||
Astrology, Usefulness of, : "Astrology -- Proof At Last", John Dee, Almnck. 1575;
|
|
||||||
"A Small Correction Regarding The Heavens", Francis Bacon, Almnck. 1605; "No, As You
|
|
||||||
Were", George Warton, Almnck. 1675.
|
|
||||||
|
|
||||||
** The Culture War
|
** The Culture War
|
||||||
** Americans
|
** Americans
|
||||||
** Europeans
|
** Europeans
|
||||||
|
|
@ -47,5 +41,5 @@ Were", George Warton, Almnck. 1675.
|
||||||
** St Stallman of Ignutious
|
** St Stallman of Ignutious
|
||||||
** St Eliezer of Yud
|
** St Eliezer of Yud
|
||||||
** St Anil of Trott
|
** St Anil of Trott
|
||||||
** St Thomas of Ptacek
|
|
||||||
** St Maciej of Maciej
|
***
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue