This repository has been archived by the owner on Sep 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
80 lines (53 loc) · 1.5 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
.DEFAULT_GOAL = all
.PHONY = all clean delete delete-javascript delete-virtualenv dev dev-full \
webpack-dev webpack-prod javascript js static npm pip prod production python \
virtualenv chown
DJANGO = DJANGO_SETTINGS_MODULE='troposphere.settings' ./manage.py
WEBPACK = $(NPM) run build
WEBPACK_DEV = $(NPM) run dev
JENKINS_WEBPACK = $(NPM) run jenkins
NPM = npm
NODE = node
SHELL = /bin/bash
jenkins : npm webpack-jenkins static relativevirtual jenkinspip django jenkinschown
all : npm webpack-dev static virtualenv pip django chown
clean :
./scripts/rm_all_pyc.sh
delete : delete-javascript delete-virtualenv
delete-javascript :
rm -rf ./node_modules/
rm -rf ./troposphere/assets/
delete-virtualenv :
rm -rf /opt/env/troposphere/
dev-full : npm webpack-dev
dev : webpack-dev
webpack-dev :
$(WEBPACK_DEV) -d --progress
webpack-jenkins : npm
$(JENKINS_WEBPACK)
webpack-prod : npm
$(WEBPACK) --production
javascript : webpack-dev static
js : javascript
static :
$(DJANGO) collectstatic
npm : package.json
$(NPM) install
pip : virtualenv
source /opt/env/troposphere/bin/activate;pip install -r requirements.txt
prod : webpack-prod static
production : webpack-prod static
python : virtualenv pip
django :
$(DJANGO) migrate
virtualenv :
mkdir -p /opt/env
-virtualenv /opt/env/troposphere
relativevirtual :
-virtualenv env
jenkinspip : relativevirtual
source ./env/bin/activate;pip install -r dev_requirements.txt
jenkinschown :
chown -R jenkins:jenkins ./env
chown :
chown -R www-data: .