blob: 8860c434fab8beb29991252702f5aac1dc5e4a07 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
SRC_DIR ?= .
DEPLOY_HOST ?=
DEPLOY_DIR ?= /var/www/
webdeploy:
@ test -n "${DEPLOY_DIR}"
rsync -vhhh --delete -Ccrzl $(SRC_DIR)/ $(DEPLOY_HOST):$(DEPLOY_DIR)/
webdeploy-test:
@ ${MAKE} webdeploy DEPLOY_DIR=${DEPLOY_DIR_test}
webdeploy-live:
@ ${MAKE} webdeploy DEPLOY_DIR=${DEPLOY_DIR_live}
webdeploy-register-hook:
@ echo '#!/bin/sh' > .git/hooks/pre-push
@ echo '[ $1 != origin ] && exit 0' >> .git/hooks/pre-push
@ echo 'makesgen' >> .git/hooks/pre-push
@ echo 'make webdeploy-live' >> .git/hooks/pre-push
@ echo 'exit 0' >> .git/hooks/pre-push
.PHONY: webdeploy webdeploy-test webdeploy-live webdeploy-register-hook
|