mirror of
https://github.com/asphyxia-core/core.git
synced 2026-12-05 15:35:15 -06:00
28 lines
500 B
Bash
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/
|
|
|