-
Notifications
You must be signed in to change notification settings - Fork 122
/
Makefile
58 lines (45 loc) · 1.26 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
#!/usr/bin/make -f
.DEFAULT: help
VERSION_FILE?=vncdotool/__init__.py
REQUIREMENTS_TXT?=requirements-dev.txt
.PHONY: help
help:
@echo "test: run unit tests"
@echo "test-func: run functional tests"
@echo "docs: build documentation"
@echo ""
@echo "version: show current version"
@echo "version-M.m.p: update version to M.m.p"
@echo "release: upload a release to pypi"
.PHONY: version
version:
./setup.py --version
version-%: OLDVERSION:=$(shell ./setup.py --version)
version-%: NEWVERSION=$(subst -,.,$*)
version-%:
sed -e "s/$(OLDVERSION)/$(NEWVERSION)/" -i "$(VERSION_FILE)"
git ci -m"bump version to $*" -- "$(VERSION_FILE)"
.PHONY: release
release: release-test release-tag upload
.PHONY: release-test
release-test: test-unit #test-func
.PHONY: release-tag
release-tag: VERSION:=$(shell ./setup.py --version)
release-tag:
git tag -a "v$(VERSION)" -m"release version $(VERSION)"
git push --tags
.PHONY: upload
upload:
./setup.py sdist
twine upload dist/"$(shell ./setup.py --fullname)".*
.PHONY: docs
docs:
$(MAKE) -C docs/ html
.PHONY: test testall test-unit test-func
test: test-unit
testall: test-unit test-func
test-unit:
$(VENV)/python -m unittest discover tests/unit
include libvncserver.mk
test-func: libvnc-examples test-libvnc
include Makefile.venv