-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
89 lines (73 loc) · 2.56 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
PROJECT=ploneintranet.suite
default: devel
# requires prefixing commands with sudo. But you can change that:
# http://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo
docker-build:
docker.io build -t $(PROJECT) .
# re-uses ssh agent
# presupposes your buildout cache is in /var/tmp as configured in .buildout
# also loads your standard .bashrc
docker-run:
docker.io run -i -t \
--net=host \
-v $(SSH_AUTH_SOCK):/tmp/auth.sock \
-v $(HOME)/.gitconfig:/.gitconfig \
-v $(HOME)/.gitignore:/.gitignore \
-v /var/tmp:/var/tmp \
-v $(HOME)/.bashrc:/.bashrc \
-v $(HOME)/.buildout:/.buildout \
-e SSH_AUTH_SOCK=/tmp/auth.sock \
-v $(PWD):/app -w /app -u app $(PROJECT)
devel: bin/buildout
bin/buildout -c dev.cfg
test:
# this works only in docker, setting HOME to enable Firefox to write it's profile
# if you want to see test failures, use DISPLAY=:0 instead
Xvfb :99 1>/dev/null 2>&1 & HOME=/app DISPLAY=:99 bin/test || true
@ps | grep Xvfb | grep -v grep | awk '{print $2}' | xargs kill 2>/dev/null
PACKAGES=collective.celery ploneintranet.attachments ploneintranet.docconv.client ploneintranet.documentviewer ploneintranet.invitations ploneintranet.notifications ploneintranet.todo ploneintranet.simplesharing ploneintranet.theme ploneintranet.workspace plonesocial.activitystream plonesocial.core plonesocial.messaging plonesocial.microblog plonesocial.network zope.testrunner
fetch:
@echo "=================== $@ ======================="
@for p in $(PACKAGES) ; \
do ( echo '---'; echo "$$p... " && cd src/$$p && git $@; ); \
done
@echo '---'
@echo -n 'ploneintranet.suite... '
@git $@
@echo
status: fetch
@echo "=================== $@ ======================="
@for p in $(PACKAGES) ; \
do ( echo '---'; echo "$$p... " && cd src/$$p && git $@; ); \
done
@echo '---'
@echo -n 'ploneintranet.suite... '
@git $@
@echo
pull: master
@echo "=================== $@ ======================="
@for p in $(PACKAGES) ; \
do ( echo '---'; echo "$$p... " && cd src/$$p && git $@; ); \
done
@echo '---'
@echo -n 'ploneintranet.suite... '
@git $@
@echo
master:
@echo "=================== $@ ======================="
@for p in $(PACKAGES) ; \
do ( echo '---'; echo "$$p... " && cd src/$$p && git checkout $@; ); \
done
@echo '---'
@echo -n 'ploneintranet.suite... '
@git checkout $@
@echo
### helper targets ###
bin/buildout: bin/python2.7
# keep these in sync with config/versions.cfg
@bin/pip install setuptools==6.0.2
@bin/python bootstrap.py -v 2.2.1
bin/python2.7:
@virtualenv --clear -p python2.7 .
clean:
rm bin/* .installed.cfg || true