forked from jasonrbriggs/stomp.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (55 loc) · 2.39 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
PYTHON:=`which python`
DESTDIR=/
PROJECT=stomp.py
PYTHON_VERSION_MAJOR:=$(shell $(PYTHON) -c "import sys;print(sys.version_info[0])")
PLATFORM := $(shell uname)
VERSION :=$(shell poetry version | sed 's/stomp.py\s*//g' | sed 's/\./, /g')
all: test install
.PHONY: docs
docs:
cd docs && make html
updateversion:
sed -i "s/__version__\s*=.*/__version__ = \($(VERSION)\)/g" stomp/__init__.py
install: updateversion test
poetry update
poetry build
poetry export -f requirements.txt --dev -o requirements.txt
test:
poetry run pytest tests/ --cov=stomp --log-cli-level=DEBUG -v -ra --full-trace --cov-report=html:../stomppy-docs/htmlcov/ --html=tmp/report.html
#buildrpm:
# $(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
#
#builddeb:
# # build the source package in the parent directory
# # then rename it to project_version.orig.tar.gz
# $(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../
# rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
# # build the package
# dpkg-buildpackage [email protected] -i -I -rfakeroot
testsingle:
poetry run pytest tests/${TEST} --log-cli-level=DEBUG -v -ra --full-trace
clean:
ifeq ($(PLATFORM),Linux)
$(MAKE) -f $(CURDIR)/debian/rules clean
endif
rm -rf build/ MANIFEST dist/ *.egg-info/ tmp/
find . -name '*.pyc' -delete
release: updateversion
poetry publish
docker/tmp/activemq-artemis-bin.tar.gz:
mkdir -p docker/tmp
wget http://www.apache.org/dist/activemq/activemq-artemis/2.13.0/apache-artemis-2.13.0-bin.tar.gz -O docker/tmp/activemq-artemis-bin.tar.gz
docker-image: docker/tmp/activemq-artemis-bin.tar.gz
docker build -t stomppy docker/
run-docker:
docker run --add-host="my.example.com:127.0.0.1" --add-host="my.example.org:127.0.0.1" --add-host="my.example.net:127.0.0.1" -d -p 61613:61613 -p 62613:62613 -p 62614:62614 -p 63613:63613 -p 64613:64613 --name stomppy -it stomppy
docker ps
docker exec -it stomppy /bin/sh -c "/etc/init.d/activemq start"
docker exec -it stomppy /bin/sh -c "/etc/init.d/stompserver start"
docker exec -it stomppy /bin/sh -c "/etc/init.d/rabbitmq-server start"
docker exec -it stomppy /bin/sh -c "start-stop-daemon --start --background --exec /usr/sbin/haproxy -- -f /etc/haproxy/haproxy.cfg"
docker exec -it stomppy /bin/sh -c "testbroker/bin/artemis-service start"
remove-docker:
docker stop stomppy
docker rm stomppy
docker: remove-docker docker-image run-docker