forked from AWeber-Imbi/imbi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (24 loc) · 755 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
REVISION = $(shell git rev-parse HEAD | cut -b 1-7)
.PHONY: all
all: dist
.PHONY: deploy_setup
deploy_setup:
apt-get install -y python3 curl
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
pip3 install --upgrade setuptools twine
.PHONY: setup
setup: openapi/node_modules ui/node_modules
.PHONY: dist
dist: setup
@ rm -rf api/dist
@ cd openapi && yarn run build
@ cp openapi/build/openapi.yaml api/imbi/templates/openapi.yaml
@ cp openapi/build/redoc.standalone.js api/imbi/static/redoc.standalone.js
@ cd ui && NODE_ENV=production yarn run build
@ cp -R ui/build/* api/imbi/static/
@ cd api && python3 setup.py sdist
openapi/node_modules:
@ cd openapi && yarn install
ui/node_modules:
@ cd ui && yarn install