From 938e276821ae0549e0159dcc368a04c5785d7d81 Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Mon, 1 Jul 2024 09:02:17 +0200 Subject: [PATCH] notification for manual deployments --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ae5d17b..cc6be98 100644 --- a/Makefile +++ b/Makefile @@ -13,12 +13,12 @@ endif include make-deploy/$(DEPLOY_TYPE).mk -.PHONY: self-update mandatory cleanup prerequisites prepare build test deploy pre-deploy post-deploy pre-local post-local upload pull start stop restart reload +.PHONY: self-update mandatory cleanup prerequisites prepare build test deploy pre-deploy post-deploy pre-local post-local upload pull start stop restart reload notify self-update: @- git submodule update --remote -deploy: mandatory cleanup prepare build test upload pre-deploy pre-local pull start post-local post-deploy reload +deploy: mandatory cleanup prepare build test upload pre-deploy pre-local pull start notify post-local post-deploy reload mandatory: @- echo "\n### mandatory check" @@ -122,7 +122,17 @@ pull: pull-$(DEPLOY_TYPE) start: start-$(DEPLOY_TYPE) stop: stop-$(DEPLOY_TYPE) - + +notify: +ifdef DEPLOY_NOTIFY_HOSTS +ifdef DEPLOY_NOTIFY_MAIL +ifdef DEPLOY_NOTIFY_MSG + @- echo "\n### notify" + @- echo "$$DEPLOY_NOTIFY_MSG :: Please deploy manually on following hosts: $$DEPLOY_NOTIFY_HOSTS" | mail -s "make-deploy notification" $(DEPLOY_MAIL) +endif +endif +endif + logs: logs-$(DEPLOY_TYPE) restart: restart-$(DEPLOY_TYPE)