From 4de17f78b3613ca580dcbcd302e91f5a8335aac3 Mon Sep 17 00:00:00 2001 From: ajuvercr Date: Sun, 17 Jan 2021 15:26:09 +0100 Subject: [PATCH] add build script --- build.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..3f38a55 --- /dev/null +++ b/build.sh @@ -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