forked from elestio/cloudgate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildBinary.sh
executable file
·42 lines (36 loc) · 1.37 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
39
40
41
42
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/cloudgate/
mkdir -p /tmp/cloudgate/
cp -r * /tmp/cloudgate/
rm -rf /tmp/cloudgate/DB/
rm -rf /tmp/cloudgate/binaries/
rm -rf /tmp/cloudgate/benchmarks/
rm -rf /tmp/cloudgate/apps/maxsens/
rm -rf /tmp/cloudgate/apps/CatchAll/CERTS/
rm -rf /tmp/cloudgate/apps/ReverseProxy/node_modules/
rm -rf ./binaries/*
mkdir -p ./binaries;
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/cloudgate/ --options max_old_space_size=4096 --targets node14-linux-x64;
pkg /tmp/cloudgate/ --options max_old_space_size=4096 --targets node16-linux-x64;
#Copy cloudgate binaries for Node 14
#cp ../bin/cloudgate_win32_x64_83.node .
#cp ../bin/cloudgate_darwin_x64_83.node .
#cp ../bin/cloudgate_linux_x64_83.node .
cp ../bin/cloudgate_linux_x64_93.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 cloudgate-linux.tar.gz cloudgate cloudgate_linux_x64_83.node
tar -czvf cloudgate-linux.tar.gz cloudgate cloudgate_linux_x64_93.node