forked from lektor/lektor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (40 loc) · 1.08 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
all: build-js
.PHONY: build-js
build-js: lektor/admin/node_modules
@echo "---> building static files"
@cd lektor/admin; npm run webpack
lektor/admin/node_modules: lektor/admin/package-lock.json
@echo "---> installing npm dependencies"
@cd lektor/admin; npm install
@touch -m lektor/admin/node_modules
# Run tests on Python files.
test-python:
@echo "---> running python tests"
tox -e lint
tox -e coverage
# Run tests on the Frontend code.
test-js: lektor/admin/node_modules
@echo "---> running javascript tests"
@cd lektor/admin; npm test
.PHONY: lint
# Lint code.
lint:
pre-commit run -a
tox -e lint
.PHONY: test
test: lint test-python test-js
.PHONY: test-all
# Run tests on all supported Python versions.
test-all: lint test-js
tox -e py36
tox -e py37
tox -e py38
tox -e py39
# This creates source distribution and a wheel.
dist: build-js setup.cfg setup.py MANIFEST.in
python setup.py sdist bdist_wheel
# Before making a release, CHANGES.md needs to be updated and
# a tag should be created (and pushed with `git push --tags`).
.PHONY: upload
upload: dist
twine upload dist/*