Files
core/build-arm-pre.sh
2023-06-23 02:14:40 +08:00

28 lines
500 B
Bash

#!/bin/bash
mkdir -p build
regex='VERSION = '"'"'([a-z0-9.]*)'"'"''
[[ $(cat ./src/utils/Consts.ts) =~ $regex ]]
VERSION=${BASH_REMATCH[1]}
export NODE_OPTIONS=--openssl-legacy-provider
echo "Building Version $VERSION for Arm"
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/