-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
61 lines (49 loc) · 1.76 KB
/
build.sh
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
#!/usr/bin/env sh
echo "**************************"
echo "STEP 1/12: cd /srv/src/kpi"
echo "**************************"
cd /srv/src/kpi
echo "*******************************"
echo "STEP 2/12: rm -rf node_modules/"
echo "*******************************"
rm -rf node_modules/
echo "********************************************"
echo "STEP 3/12: npm install -g check-dependencies"
echo "********************************************"
npm install -g check-dependencies
echo "******************************"
echo "STEP 4/12: npm install --quiet"
echo "******************************"
npm install --quiet
echo "**********************************"
echo "STEP 5/12: npm cache clean --force"
echo "**********************************"
npm cache clean --force
echo "******************************"
echo "STEP 6/12: rm -rf jsapp/fonts/"
echo "******************************"
rm -rf jsapp/fonts/
echo "*********************************"
echo "STEP 7/12: rm -rf jsapp/compiled/"
echo "*********************************"
rm -rf jsapp/compiled/
echo "*****************************"
echo "STEP 8/12: npm run copy-fonts"
echo "*****************************"
npm run copy-fonts
echo "************************"
echo "STEP 9/12: npm run build"
echo "************************"
npm run build
echo "****************************************************"
echo "STEP 10/12: python manage.py collectstatic --noinput"
echo "****************************************************"
python manage.py collectstatic --noinput
echo "*******************************"
echo "STEP 11/12: source /etc/profile"
echo "*******************************"
source /etc/profile
echo "*****************"
echo "STEP 12/12: rsync"
echo "*****************"
rsync -aq --delete --chown=www-data "${KPI_SRC_DIR}/staticfiles/" "${NGINX_STATIC_DIR}/"