-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (32 loc) · 1.11 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
error: FORCE
@echo "Please choose one of the following targets: build, package, install, post-install"
@exit 2
# Empty rule to force other rules to be updated.
FORCE:
#### Build: main steps
package: FORCE build
mv frontend/build/ frontend-build/
gzip -k9 frontend-build/*.html frontend-build/static/js/* frontend-build/static/css/*
rm -rf .git* frontend/
tar czf ../finance-`cat branch.txt`-`cat version.txt`.tar.gz .
build: FORCE prepare frontend
prepare: FORCE prepare-version
frontend: FORCE frontend-npm frontend-build
#### Build: substeps
prepare-version: FORCE
git describe --always --tags > version.txt
git rev-parse --abbrev-ref HEAD > branch.txt
frontend-npm: FORCE
rm -rf frontend/node_modules
cd frontend; yarn
frontend-build: FORCE frontend-npm
cd frontend; yarn run build
#### Install: main steps
install: FORCE backend-pip backend-migrations
backend-pip: FORCE
cd backend; virtualenv --python=python3 venv
cd backend; ./venv/bin/pip install -U -r packages.pip
backend-migrations: FORCE
cd backend; ./venv/bin/python manage.py migrate
post-install:
echo "Post install msg, nothing for now."