mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-11 18:58:59 +03:00
* Consolidate amd64/arm64 .deb installer workflow to one matrix * Python + node version update on mac * Update rpm to latest image + python version * Update windows python + node version * Quote all the python versions * Fix node for .debs * update to npx for rpm * Mark workspace safe for rpm * Use npx for node tools on mac * npx on windows for node tools * Set skip package install for rpm * Revert "Set skip package install for rpm" This reverts commit f8c5211f8b793fa7e4921a60f5eef5c28ee28868. * skip-system-installs
48 lines
1.3 KiB
Bash
48 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
set -o errexit
|
|
|
|
echo "Installing global npm packages"
|
|
cd npm_linux || exit 1
|
|
npm ci
|
|
|
|
cd ../../ || exit 1
|
|
git submodule update --init chia-blockchain-gui
|
|
|
|
cd ./chia-blockchain-gui || exit 1
|
|
|
|
echo "npm build"
|
|
npx lerna clean -y
|
|
npm ci
|
|
# Audit fix does not currently work with Lerna. See https://github.com/lerna/lerna/issues/1663
|
|
# npm audit fix
|
|
npm run build
|
|
LAST_EXIT_CODE=$?
|
|
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
|
echo >&2 "npm run build failed!"
|
|
exit $LAST_EXIT_CODE
|
|
fi
|
|
|
|
# Remove unused packages
|
|
rm -rf node_modules
|
|
|
|
# Other than `chia-blockchain-gui/package/gui`, all other packages are no longer necessary after build.
|
|
# Since these unused packages make cache unnecessarily fat, here unused packages are removed.
|
|
echo "Remove unused @chia-network packages to make cache slim"
|
|
ls -l packages
|
|
rm -rf packages/api
|
|
rm -rf packages/api-react
|
|
rm -rf packages/core
|
|
rm -rf packages/icons
|
|
rm -rf packages/wallets
|
|
|
|
# Remove unused fat npm modules from the gui package
|
|
cd ./packages/gui/node_modules || exit 1
|
|
echo "Remove unused node_modules in the gui package to make cache slim more"
|
|
rm -rf electron/dist # ~186MB
|
|
rm -rf "@mui" # ~71MB
|
|
rm -rf typescript # ~63MB
|
|
|
|
# Remove `packages/gui/node_modules/@chia-network` because it causes an error on later `electron-packager` command
|
|
rm -rf "@chia-network"
|