-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathbuild_all.sh
More file actions
executable file
·77 lines (63 loc) · 1.29 KB
/
build_all.sh
File metadata and controls
executable file
·77 lines (63 loc) · 1.29 KB
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/bash -l
#
# build all repositories
#
RED='\033[0;31m'
YELLOW='\033[1;33m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
COMMUNITY_BUILD=false
cables_electron="true";
if [[ "$*" == *"--community"* ]]
then
COMMUNITY_BUILD=true
cables_electron="false";
fi
export cables_electron;
ls ~/.nvm/nvm.sh > /dev/null 2>&1
if [ $? -eq 0 ]
then
echo -e "LOADING NODEJS VERSION" `cat .nvmrc`
. ~/.nvm/nvm.sh
nvm install `cat .nvmrc`
nvm use `cat .nvmrc`
nvm use
nvm alias --no-colors default `cat .nvmrc`
else
echo -e "NVM NOT FOUND, RUNNING NODEJS WITH VERSION" `node --version` ", WANTED" `cat .nvmrc`;
fi
echo -e ""
echo -e "${GREEN}BUILDING SHARED...${NC}"
cd shared
npm run build
cd ..
echo -e ""
echo -e "${GREEN}BUILDING CORE...${NC}"
cd cables
npm run build
cd ..
echo -e ""
echo -e "${GREEN}BUILDING UI...${NC}"
cd cables_ui
npm run build
cd ..
if [ -d cables_electron ]; then
echo -e ""
echo -e "${GREEN}BUILDING ELECTRON...${NC}"
cd cables_electron
npm run build
cd ..
fi
if [ -d cables_api ]; then
if [ -f cables_api/package.json ]; then
echo -e ""
echo -e "${GREEN}BUILDING API...${NC}"
cd cables_api
npm run build
cd ..
fi
fi
cd "$BASEDIR"
echo -e ""
echo -e "${GREEN}DONE${NC}"