add build script
This commit is contained in:
parent
4dc946ef92
commit
4de17f78b3
1 changed files with 31 additions and 0 deletions
31
build.sh
Executable file
31
build.sh
Executable 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
|
Loading…
Reference in a new issue