forked from Sunbird-Ed/SunbirdEd-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·54 lines (39 loc) · 990 Bytes
/
build.sh
File metadata and controls
executable file
·54 lines (39 loc) · 990 Bytes
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
# Simple script to clean install
rm -rf node_modules
rm -rf platforms
rm -rf plugins
rm -rf www
NPM_COUNTER=0
CORDOVA_COUNTER=0
# NPM[0]=""
# CORDOVA[0]=""
file="./build_config"
while IFS="=" read -r key value; do
case "$key" in
'#'*) ;;
'npm'*)
NPM[$NPM_COUNTER]=$value
NPM_COUNTER=`expr $NPM_COUNTER + 1`;;
'cordova'*)
CORDOVA[$CORDOVA_COUNTER]=$value
CORDOVA_COUNTER=`expr $CORDOVA_COUNTER + 1`;;
esac
done < "$file"
git clone --depth 1 https://github.com/project-sunbird/genie-sdk-wrapper.git
cd genie-sdk-wrapper
rm package-lock.json
npm install
npm run build
rm `pwd`/dist/dependencies.json
npm pack `pwd`/dist
cd ..
npm install
npm install `pwd`/genie-sdk-wrapper/*.tgz --save
rm -rf genie-sdk-wrapper
for cordova_plugin in "${CORDOVA[@]}"
do
ionic cordova plugin add $cordova_plugin
done
rm -rf platforms
ionic cordova platforms add android
ionic cordova build android --prod --release --buildConfig ./buildConfig/build.json