wallet-svr/boundle.sh
2022-12-02 12:59:43 +08:00

21 lines
591 B
Bash
Executable File

#!/bin/bash
# source /etc/profile
# npm install --prefer-offline --loglevel info --unsafe-perm=true --allow-root >> boundle.log
# npm run build
yarn build
rm -rf tmp
rm -rf target
mkdir tmp
mv dist tmp/dist
mv node_modules tmp/node_modules
cp start.json tmp/start.json
cp .env.production tmp/.env.production
cp package.json tmp/package.json
echo 'move node_modules to tmp/node_modules' >> boundle.log
cd ./tmp/ && tar -zcvf wallet-svr.tar.gz ./
cd ..
mkdir target && mv ./tmp/wallet-svr.tar.gz ./target/wallet-svr.tar.gz
mv tmp/node_modules node_modules
echo 'all done' 2>&1 >> boundle.log