forked from elestio/ws-monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildBinary.sh
executable file
·38 lines (31 loc) · 1.17 KB
/
buildBinary.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
if ! command -v node &> /dev/null
then
echo "node is required to build, try: apt install nodejs"
exit
fi
if ! command -v pkg &> /dev/null
then
echo "Installing PKG"
npm install -g pkg
fi
rm -rf /tmp/ws-monitoring/
mkdir -p /tmp/ws-monitoring/
cp -r * /tmp/ws-monitoring/
rm -rf /tmp/ws-monitoring/helm/
rm -rf /tmp/ws-monitoring/binaries/
mkdir -p ./binaries;
rm ./binaries/cloudgate_linux_x64_83.node
rm ./binaries/ws-monitoring
rm ./binaries/ws-monitoring-linux.tar.gz
cd ./binaries;
#package cloudgate as binaries for win/osx/linux
#pkg /tmp/cloudgate/ --options max_old_space_size=4096 --targets node14-linux-x64,node14-win-x64,node14-macos-x64;
pkg /tmp/ws-monitoring/ --options max_old_space_size=4096 --targets node14-linux-x64;
#Copy cloudgate binaries for Node 14
#cp ../bin/cloudgate_win32_x64_83.node .
#cp ../bin/cloudgate_darwin_x64_83.node .
cp ../node_modules/@elestio/cloudgate/bin/cloudgate_linux_x64_83.node .
#create tar.gz
#tar -czvf cloudgate-win.tar.gz cloudgate-win.exe cloudgate_win32_x64_83.node
#tar -czvf cloudgate-osx.tar.gz cloudgate-macos cloudgate_darwin_x64_83.node
tar -czvf ws-monitoring-linux.tar.gz ws-monitoring cloudgate_linux_x64_83.node