add build script

This commit is contained in:
ajuvercr 2021-01-17 15:26:09 +01:00
parent 4dc946ef92
commit 4de17f78b3

31
build.sh Executable file
View file

@ -0,0 +1,31 @@
#!/bin/bash
info() {
echo
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>> $1"
echo
}
source /home/$USER/.cargo/env
cd "$(dirname "$0")"
info "Pulling git"
git pull
cd frontend
info "Building WASM package"
cargo update
wasm-pack build
cd www
info "Building frontend with npm"
npm run build
cd ../..
cd backend
info "Building backend with cargo --release"
cargo update
cargo build --release