From 8cfb259062846f64941237abaaee8b19cfe5cddc Mon Sep 17 00:00:00 2001 From: c0dev0id Date: Thu, 2 Nov 2023 11:43:25 +0100 Subject: [PATCH] Update 2023-11-02 11:43 --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 26055f2..fef7be0 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,8 @@ PS_FILES != find src -type f -name "*.ps" | sed 's|src/||g' PA_FILES != find src -type f -name "*.pa" | sed 's|src/||g' PT_FILES != find src -type f -name "*.pt" | sed 's|src/||g' +COMMIT_MSG != echo "Update $$(date +"%Y-%m-%d %H:%M")" + # put static files and dirs into .control/static-files. Globbing is supported. STATIC_FILES != cat .control/static-files @@ -73,6 +75,11 @@ prepare: echo "Mkdir: www" mkdir -p www +git-commit: + git pull --autostash + git add src Makefile + git commit -m "$(COMMIT_MSG)" + copy-static-files: prepare rsync -a --partial --delete --no-p --no-o --no-g --out-format="Copy: %f => www/" $(STATIC_FILES) www/ @@ -84,12 +91,13 @@ _clean: install: make -s _install + make -s git-commit _install: website echo "Fixing Permissions in www/" doas chown -R sdk:www www doas chmod -R ugo+Xrw www echo "Deploy: www/ => /var/www/htdocs/" - cd www && doas rsync -a --partial --delete --exclude "*/cache/*" --out-format="Deploy: %f => /var/www/htdocs/%f" * $(REMOTE) + cd www && doas rsync -a -o -g -p --inplace --partial --delete --exclude "*/cache/*" --out-format="Deploy: %f => /var/www/htdocs/%f" * $(REMOTE) #### HELPER TARGETS ####