target specific pre- and post-deploy scripts

This commit is contained in:
Andreas Neue 2022-10-06 10:25:40 +02:00
parent a9ee4acddc
commit 8ad9a3dd6f
1 changed files with 5 additions and 5 deletions

View File

@ -14,15 +14,15 @@ self-update:
deploy: upload pre-deploy pre-local pull start post-local post-deploy
pre-deploy:
@- echo "\n### running pre-deploy script"
@- echo "\n### running pre-deploy script(s)"
@- $(foreach host,$(DEPLOY_HOSTS), \
ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); sh pre-deploy.sh"; \
ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); sh pre-deploy.sh; sh pre-deploy_$(host).sh"; \
)
post-deploy:
@- echo "\n### running post-deploy script"
@- echo "\n### running post-deploy script(s)"
@- $(foreach host,$(DEPLOY_HOSTS), \
ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); sh post-deploy.sh"; \
ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); sh post-deploy.sh; sh post-deploy_$(host).sh"; \
)
pre-local:
@ -30,7 +30,7 @@ pre-local:
@- sh ./pre-local.sh
post-local:
@- echo "\n### running pre-local script"
@- echo "\n### running post-local script"
@- sh ./post-local.sh
upload: