add pre- and post-local

This commit is contained in:
Andreas Neue 2022-10-05 16:02:54 +02:00
parent cfc7d1ca0b
commit a9ee4acddc
2 changed files with 14 additions and 3 deletions

View File

@ -11,7 +11,7 @@ include secrets.mk
self-update: self-update:
@- git submodule update --remote @- git submodule update --remote
deploy: upload pre-deploy pull start post-deploy deploy: upload pre-deploy pre-local pull start post-local post-deploy
pre-deploy: pre-deploy:
@- echo "\n### running pre-deploy script" @- echo "\n### running pre-deploy script"
@ -25,6 +25,14 @@ post-deploy:
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"; \
) )
pre-local:
@- echo "\n### running pre-local script"
@- sh ./pre-local.sh
post-local:
@- echo "\n### running pre-local script"
@- sh ./post-local.sh
upload: upload:
@- echo "\n### uploading files" @- echo "\n### uploading files"
@- $(foreach host,$(DEPLOY_HOSTS), \ @- $(foreach host,$(DEPLOY_HOSTS), \

View File

@ -1,10 +1,13 @@
# copy # copy
# #
# this just rsyncs the stuff to the remote server(s) and runs # this just rsyncs the stuff to the remote server(s) and runs
# pre- and post-deploy # pre-/post-deploy and pre-/post-local
pull-copy: pull-copy:
# nop # nop
start-copy: start-copy:
# nop @- echo "\n### start"
@- $(foreach host,$(DEPLOY_HOSTS), \
ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); sh start.sh"; \
)