Files
core/build-linux.sh
LatoWolf 2c83c1e10f Remove NODE_OPTIONS export in build script
Remove legacy OpenSSL provider option for Node. Since we're using node16 runner GitHub action, this option should be removed
2026-03-14 13:21:42 +08:00

37 lines
760 B
Bash
Executable File

#!/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