-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathMakefile
53 lines (41 loc) · 942 Bytes
/
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
FRONTEND := $(shell find . -maxdepth 2 -name frontend)
NPM := npm --prefix=$(FRONTEND)
NCU := ncu --cwd=$(FRONTEND)
set_release = \
find . -maxdepth 2 -name version.py -print0 | \
xargs -0 sed -i "s/\(__release__ = \).*/\1$1/g"
.PHONY: install
install: dev
$(NPM) install
pip install -e .
.PHONY: run
run: dev
$(NPM) run dev
.PHONY: upgrade
upgrade: upgrade-frontend upgrade-wheel
.PHONY: upgrade-frontend
upgrade-frontend: dev
npm install --global npm-check-updates
$(NCU) --upgrade
$(NPM) update
.PHONY: upgrade-wheel
upgrade-wheel: dev
pip install pip --upgrade
pip install -e . --upgrade
.PHONY: build
build: build-frontend build-wheel
.PHONY: build-frontend
build-frontend: release
$(NPM) run build
.PHONY: build-wheel
build-wheel: release
python setup.py sdist bdist_wheel
.PHONY: upload
upload:
twine upload dist/*
.PHONY: dev
dev:
$(call set_release,False)
.PHONY: release
release:
$(call set_release,True)