forked from obfusk/apksigcopier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (38 loc) · 1.03 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
SHELL := /bin/bash
PYTHON ?= python3
export PYTHONWARNINGS := default
.PHONY: all install test test-cli test-apks lint lint-extra clean cleanup
all: apksigcopier.1
install:
$(PYTHON) -mpip install -e .
test: test-cli lint lint-extra
test-cli:
# TODO
apksigcopier --version
$(PYTHON) -m doctest apksigcopier
test-apks:
cd test && diff -Naur test-compare.out <( ./test-compare.sh \
| sed -r 's!/tmp/[^/]*/!/tmp/.../!' \
| sed -r 's!Expected: <[0-9a-f]+>, actual: <[0-9a-f]+>!Expected: <...>, actual: <...>!' )
lint:
flake8 apksigcopier.py
pylint apksigcopier.py
lint-extra:
mypy apksigcopier.py
clean: cleanup
rm -fr apksigcopier.egg-info/
cleanup:
find -name '*~' -delete -print
rm -fr __pycache__/ .mypy_cache/
rm -fr build/ dist/
rm -fr .coverage htmlcov/
rm -fr apksigcopier.1
%.1: %.1.md
pandoc -s -t man -o $@ $<
.PHONY: _package _publish
_package:
$(PYTHON) setup.py sdist bdist_wheel
twine check dist/*
_publish: cleanup _package
read -r -p "Are you sure? "; \
[[ "$$REPLY" == [Yy]* ]] && twine upload dist/*