-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
30 lines (25 loc) · 951 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
pypi:
$(MAKE) -C django pypi
####################
RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
RSYNC := rsync -ai $(RSYNC_COND_DRY_RUN)
# the list of files either in the index, or modified
NEWS = $(shell (git diff --name-only; git diff --name-only --cached) | sort -u)
GIT-FILES = $(shell git ls-files)
DEVBOX = [email protected]
PRODBOX = [email protected]
TESTBOX = [email protected]
### push just the files that have changed
syncdev:
+$(RSYNC) --relative $(NEWS) $(DEVBOX):nbhosting/
syncprod:
+$(RSYNC) --relative $(NEWS) $(PRODBOX):nbhosting/
synctest:
+$(RSYNC) --relative $(NEWS) $(TESTBOX):git/nbhosting/
# using git ls-files -m is nice, but sometimes it's too picky
syncdev+:
+$(RSYNC) --relative $(GIT-FILES) $(DEVBOX):nbhosting/
syncprod+:
+$(RSYNC) --relative $(GIT-FILES) $(PRODBOX):nbhosting/
synctest+:
+$(RSYNC) --relative $(GIT-FILES) $(TESTBOX):git/nbhosting/