include additional rsync options in .rsync and .rsync_HOSTNAME, mostly meant for additional filters in addition to the defaults

This commit is contained in:
Andreas Neue 2023-08-22 13:36:12 +02:00
parent 7045e37564
commit 575402c7a8
1 changed files with 7 additions and 1 deletions

View File

@ -98,7 +98,13 @@ ifdef DEPLOY_HOSTS
@- echo "\n### uploading files"
@- $(foreach host,$(DEPLOY_HOSTS), \
ssh $(SSH_USER)@$(host) "mkdir -p $(DEPLOY_PATH)/$(DEPLOY_NAME)"; \
rsync -rav $(cat .rsync) $(cat .rsync_$(host)) --exclude '*~' --exclude '.git*' --exclude '*.swp' . $(SSH_USER)@$(host):$(DEPLOY_PATH)/$(DEPLOY_NAME); \
rsync_xtra=`cat .rsync`; \
rsync_xtra_host=`cat .rsync_$(host)`; \
param="-ravv"; \
param="$$param $$rsync_xtra"; \
param="$$param $$rsync_xtra_host"; \
param="$$param . --exclude '*~' --exclude '.git*' --exclude '*.swp' $(SSH_USER)@$(host):$(DEPLOY_PATH)/$(DEPLOY_NAME)"; \
eval rsync $$param; \
ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME) && chmod o-r .env secrets*"; \
)
endif