-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbundle.sh
47 lines (39 loc) · 883 Bytes
/
bundle.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
#!/bin/bash
STATUS=0;
echo "Building Angular application"
cd angular
npm install && ng build --prod
STATUS=$?
if [ $STATUS -ne 0 ]
then
printf '\u274c Failed\n'
exit 1
else
# clear JS and CSS
echo '' > ../src/main/webapp/js/main.js
# echo '' > ../src/main/webapp/css/main.css
echo "Merging and copying files"
cat dist/runtime.*.js \
dist/polyfills.*.js \
dist/vendor.*.js \
dist/main.*.js > ../src/main/webapp/js/main.js && \
cat dist/styles.*.css > ../src/main/webapp/css/main.css
cp -v dist/fontawesome-webfont.* ../src/main/webapp/css/
STATUS=$?
fi
if [ $STATUS -ne 0 ]
then
printf '\u274c Failed\n'
exit 1
else
echo "Building portlet archive"
cd ..
mvn package
fi
if [ $STATUS -ne 0 ]
then
printf '\u274c Failed\n'
exit 1
else
printf "\u2714 Congratulations, your portlet archive is placed in target/ directory\n"
fi