forked from media-centre/makenews
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·75 lines (68 loc) · 1.37 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/sh
echo "--- npm install started"
npm install
if [ "$?" -ne 0 ]
then
echo "*** npm install failed."
exit
fi
echo "--- npm install completed"
echo "--- npm rebuild node-sass started"
npm rebuild node-sass
if [ "$?" -ne 0 ]
then
echo "*** npm rebuild node-sass failed."
exit
fi
echo "--- npm rebuild node-sass completed"
echo "--- gulp clean started"
gulp clean
if [ "$?" -ne 0 ]
then
echo "*** gulp clean failed."
exit
fi
echo "--- gulp clean completed"
echo "--- gulp build started"
NODE_ENV=production gulp build
if [ "$?" -ne 0 ]
then
echo "*** gulp build failed."
exit
fi
echo "--- gulp build completed"
#echo "--- mobile initial setup started"
#gulp mobile:create
#if [ "$?" -ne 0 ]
#then
# echo "*** gulp mobile:create failed."
# exit
#fi
#echo "--- mobile initial setup completed"
#
#echo "--- mobile build started"
#gulp mobile:build
#if [ "$?" -ne 0 ]
#then
# echo "*** gulp mobile:build failed."
# exit
#fi
#echo "--- mobile build completed"
echo "--- npm install only for dependencies started"
cd ./dist
npm install --production
if [ "$?" -ne 0 ]
then
echo "*** npm install in dist folder failed."
exit
fi
cd ..
echo "--- npm install only for dependencies completed"
echo "--- packaging dist folder started"
tar czf ./dist.tar.gz ./dist
if [ "$?" -ne 0 ]
then
echo "*** packaging dist folder failed."
exit
fi
echo "--- packaging dist folder completed"