forked from asphyxia-core/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-linux.sh
More file actions
36 lines (25 loc) · 760 Bytes
/
build-linux.sh
File metadata and controls
36 lines (25 loc) · 760 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
#!/bin/bash
mkdir -p build
regex='VERSION = '"'"'([a-z0-9.]*)'"'"''
[[ $(cat ./src/utils/Consts.ts) =~ $regex ]]
VERSION=${BASH_REMATCH[1]}
echo "Building Version $VERSION for Linux"
echo "NPM Install"
npm ci
echo "Building Typescripts"
npx tsc
echo "Packing index.js"
npx ncc build ./dist/AsphyxiaCore.js -o ./build-env --external pug --external ts-node
echo "Setting Up Build Environment"
cd ./build-env
npm ci
cp -r typescript ./node_modules/
echo "Packing binaries"
cd ..
npx pkg ./build-env -t node16.16.0-linux-x64 -o ./build/asphyxia-core --options no-warnings
echo "Compressing"
rm -f ./build/asphyxia-core-linux-x64.zip
cd build
zip -qq asphyxia-core-linux-x64.zip asphyxia-core
cd ..
zip -qq ./build/asphyxia-core-linux-x64.zip -r plugins