From 082c9f4b742de97e979d41a8e11a7867aa4299ac Mon Sep 17 00:00:00 2001 From: Jens Kleineheismann Date: Fri, 17 Feb 2023 13:17:17 +0100 Subject: [PATCH] Added deploy rule to Makefile (used as deploy pipeline for CI/CD) --- Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 220925c..d2b8c8b 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,20 @@ -.PHONY: default help test +PYTHON := python + +DEPLOY_DIR ?= /var/www/wsgi/django-dav-events + +.PHONY: default help test deploy default: help help: - @echo "The make stuff is used by our CI/CD environment." + @echo "The make stuff is used by our CI/CD buildbot." test: tox + +deploy: + git -C "$(DEPLOY_DIR)/src/django-dav-events" pull + "$(DEPLOY_DIR)/python/bin/python" "$(DEPLOY_DIR)/django/manage.py" migrate --noinput + "$(DEPLOY_DIR)/python/bin/python" "$(DEPLOY_DIR)/django/manage.py" collectstatic --noinput + touch "$(DEPLOY_DIR)/django/main/wsgi.py" +