forked from buildbot/buildbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
89 lines (73 loc) · 2.81 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
# developer utilities
DOCKERBUILD := docker build --build-arg http_proxy=$$http_proxy --build-arg https_proxy=$$https_proxy
.PHONY: docs pylint flake8 virtualenv
PIP?=pip
# build rst documentation
docs:
$(MAKE) -C master/docs
# check rst documentation
docschecks:
$(MAKE) -C master/docs SPHINXOPTS=-W spelling
$(MAKE) -C master/docs SPHINXOPTS=-q linkcheck
# pylint the whole sourcecode (validate.sh will do that as well, but only process the modified files)
pylint:
$(MAKE) -C master pylint; master_res=$$?; \
$(MAKE) -C worker pylint; worker_res=$$?; \
if [ $$master_res != 0 ] || [ $$worker_res != 0 ]; then exit 1; fi
# flake8 the whole sourcecode (validate.sh will do that as well, but only process the modified files)
flake8:
$(MAKE) -C master flake8
$(MAKE) -C worker flake8
flake8 --config=common/flake8rc www/*/buildbot_*/
flake8 --config=common/flake8rc www/*/setup.py
# rebuild front-end from source
frontend:
$(PIP) install -e pkg
$(PIP) install mock
for i in base wsgi_dashboards codeparameter console_view waterfall_view nestedexample; do $(PIP) install -e www/$$i || exit 1; done
# do installation tests. Test front-end can build and install for all install methods
frontend_install_tests:
$(PIP) install -e pkg
$(PIP) install mock wheel
trial pkg/test_buildbot_pkg.py
# install git hooks for validating patches at commit time
hooks:
cp common/hooks/* `git rev-parse --git-dir`/hooks
rmpyc:
find . \( -name '*.pyc' -o -name '*.pyo' \) -exec rm -v {} \;
isort:
isort -rc worker master
git diff --name-only --stat "HEAD" | grep '.py$$' | xargs autopep8 -i
git commit -a -m "isort+autopep8 run"
docker: docker-buildbot-worker docker-buildbot-worker-node docker-buildbot-master docker-buildbot-master-ubuntu
echo done
docker-buildbot-worker:
$(DOCKERBUILD) -t buildbot/buildbot-worker:master worker
docker-buildbot-master:
$(DOCKERBUILD) -t buildbot/buildbot-master:master master
docker-buildbot-master-ubuntu:
$(DOCKERBUILD) -t buildbot/buildbot-master-ubuntu:master -f master/Dockerfile.ubuntu master
.venv:
virtualenv .venv
.venv/bin/pip install -U pip setuptools
.venv/bin/pip install -e pkg \
-e 'master[tls,test,docs]' \
-e 'worker[test]' \
buildbot_www \
'git+https://github.com/tardyp/towncrier'
# helper for virtualenv creation
virtualenv: .venv
@echo now you can type following command to activate your virtualenv
@echo . .venv/bin/activate
release_notes: .venv
test ! -z "$(VERSION)" # usage: make release_notes VERSION=0.9.2
yes | towncrier --version $(VERSION) --date `date -u +%F`
git commit -m "relnotes for $(VERSION)"
# helper for release creation
release: .venv
test ! -z "$(VERSION)" # usage: make release VERSION=0.9.2
GPG_TTY=`tty` git tag -a -sf v$(VERSION) -m "TAG $(VERSION)"
./common/maketarballs.sh
./common/smokedist.sh
make docs
echo twine upload --sign dist/*