-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (46 loc) · 1.38 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
# BGE 开放平台 Makefile 工具
PYTHON=`which python`
PIP = `which pip`
install:
$(PYTHON) setup.py install
# 构建源码包
build:
$(PYTHON) setup.py bdist_wheel; \
$(PYTHON) setup.py sdist
# 单元测试
test:
$(PIP) install pytest pytest-cov; \
grep -v '^#' .env; \
export $(grep -v '^#' .env | xargs); \
pytest -s --cov-config=./.coveragerc --cov-report html --cov-report xml --cov=./
test-pro:
$(PIP) install pytest pytest-cov; \
grep -v '^#' .env-pro; \
export $(grep -v '^#' .env-pro | xargs); \
pytest -s --cov-config=./.coveragerc --cov-report html --cov-report xml --cov=./
upload-test:
$(PIP) install twine; \
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
upload:
$(PIP) install twine; \
twine upload dist/*
changelog:
npm run changelog
clean:
rm -rf build \
dist \
*.egg-info __pycache__/ \
bgesdk/__pycache__/ \
bgesdk/*.pyc \
bgesdk/management/*.pyc \
bgesdk/management/__pycache__/ \
bgesdk/management/commands/*.pyc \
bgesdk/management/commands/__pycache__/ \
bgesdk/management/commands/api/*.pyc \
bgesdk/management/commands/api/__pycache__/ \
bgesdk/management/commands/api/commands/*.pyc \
bgesdk/management/commands/api/commands/__pycache__/ \
tests/*.pyc \
tests/__pycache__/ \
.bge/tmp/*
.PHONY: test test-pro upload upload-test build install changelog clean