-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
76 lines (56 loc) · 1.75 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
PYLINTRC='./.pylintrc'
TEST_PYLINTRC='./test/.pylintrc'
VERSION=$(shell python lib.py version)
# developer
DEFAULT_TEST_PORT="8002"
DEFAULT_CALL_URL="http://127.0.0.1:$(DEFAULT_TEST_PORT)/bot"
DEFAULT_CALL_ID="172862922"
DEFAULT_CALL_TEXT="test"
PYVERSION=$(shell which python3.5 || echo python)
ifneq ('$(PYVERSION)','python')
PYVERSION='python3.5'
endif
ifeq ('$(DEV_CALL_ID)','')
DEV_CALL_ID=$(DEFAULT_CALL_ID)
endif
ifeq ('$(DEV_CALL_URL)','')
DEV_CALL_URL=$(DEFAULT_CALL_URL)
endif
ifeq ('$(CALL_TEXT)','')
CALL_TEXT=$(DEFAULT_CALL_TEXT)
endif
ifeq ('$(SEMVER)','')
SEMVER='patch'
endif
ifeq ('$(PUSH)','')
PUSH='false'
endif
NEXT='$(shell python lib.py $(SEMVER) next-version)'
lint:
pylint --rcfile=$(PYLINTRC) bobot
pylint --rcfile=$(TEST_PYLINTRC) test
publish-test:
echo 'Publishing into PYPITEST $(SEMVER) release with version: $(VERSION)'
./tasks/publish.sh pypitest $(VERSION) $(PUSH) true
publish:
echo 'Publishing into PYPI $(SEMVER) release with version: $(VERSION)'
./tasks/publish.sh pypi $(VERSION) $(PUSH) true
release-test:
echo 'Publishing into PYPITEST $(SEMVER) release with version: $(NEXT) (Update from: $(VERSION))'
./tasks/publish.sh pypitest $(NEXT) $(PUSH) true
release:
echo 'Publishing into PYPI $(SEMVER) release with version: $(NEXT) (Update from: $(VERSION))'
./tasks/publish.sh pypi $(NEXT) $(PUSH) true
register-test:
python setup.py register -r pypitest
register:
python setup.py register -r pypi
commit-release:
echo 'Commiting $(SEMVER) release with version: $(NEXT) (Update from: $(VERSION))'
./tasks/publish.sh pypitest $(NEXT) $(PUSH) false
call:
./tasks/call.sh $(DEV_CALL_URL) $(DEV_CALL_ID) "$(CALL_TEXT)"
tests:
$(PYVERSION) ./test/testrunner.py
run-test-server:
python3.5 test/testserver.py debug