2021-07-15 06:35:51 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# Cleans up files/directories that may be left over from previous runs for a clean slate before starting a new build
|
|
|
|
|
2022-03-17 19:13:27 +03:00
|
|
|
set -o errexit
|
|
|
|
|
2021-08-27 06:22:05 +03:00
|
|
|
PWD=$(pwd)
|
|
|
|
|
2021-07-15 06:35:51 +03:00
|
|
|
rm -rf ../venv || true
|
|
|
|
rm -rf venv || true
|
|
|
|
rm -rf chia_blockchain.egg-info || true
|
|
|
|
rm -rf build_scripts/final_installer || true
|
|
|
|
rm -rf build_scripts/dist || true
|
|
|
|
rm -rf build_scripts/pyinstaller || true
|
|
|
|
rm -rf chia-blockchain-gui/build || true
|
|
|
|
rm -rf chia-blockchain-gui/daemon || true
|
|
|
|
rm -rf chia-blockchain-gui/node_modules || true
|
2021-08-27 06:22:05 +03:00
|
|
|
rm chia-blockchain-gui/temp.json || true
|
|
|
|
( cd "$PWD/chia-blockchain-gui" && git checkout HEAD -- package-lock.json ) || true
|
|
|
|
cd "$PWD" || true
|
2021-08-25 00:04:14 +03:00
|
|
|
|
2022-01-15 00:26:58 +03:00
|
|
|
# Clean up old globally installed node_modules that might conflict with the current build
|
|
|
|
rm -rf /opt/homebrew/lib/node_modules || true
|
|
|
|
|
|
|
|
# Clean up any installed versions of node so we can start fresh
|
|
|
|
brew list | grep "^node\@\|^node$" | xargs -L1 brew uninstall || true
|