summaryrefslogtreecommitdiff
path: root/Makefile
blob: 180f1580cfd9da55808591d9ace5a94d9aeeaa5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
all: build deploy

build:
	cd gospeladlershof.de && make build	

deploy:
	if [ -d /var/www/gospeladlershof.de ]; then\
		( rsync --delete --exclude=secrets.php --exclude=json -avz intern/ /var/www/gospeladlershof.de/intern/ 1>/dev/null 2>/dev/null && \
		cd gospeladlershof.de && rsync --delete -avz public/ /var/www/gospeladlershof.de/gospeladlershof.de/ 1>/dev/null 2>/dev/null && \
		cd .. && rsync --delete -avz intern.gospeladlershof.de/ /var/www/gospeladlershof.de/intern.gospeladlershof.de/ 1>/dev/null 2>/dev/null && \
		echo "Success: Site gospeladlershof.de was built.") || ./error.sh; \
	else \
		rsync --delete --exclude=secrets.php --exclude=json -avze ssh intern/ online:/var/www/gospeladlershof.de/intern/ && \
		cd gospeladlershof.de && rsync --delete --exclude=secrets.php --exclude=json -avze ssh public/ online:/var/www/gospeladlershof.de/gospeladlershof.de/; \
	fi

clean:
	cd gospeladlershof.de && make clean