From 1b2dd64bff32149d31d83557568254815bb94125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 19 Mar 2024 13:40:34 +0100 Subject: [PATCH] unify build commands --- build_all.sh | 3 +++ hook_shared.sh | 1 + hook_standalone.sh | 2 +- shared/package.json | 1 + update_live.sh | 11 +++++++++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/build_all.sh b/build_all.sh index a03cfa9..afa8bb7 100755 --- a/build_all.sh +++ b/build_all.sh @@ -1,3 +1,6 @@ +cd shared +npm run build +cd .. cd cables npm run build cd .. diff --git a/hook_shared.sh b/hook_shared.sh index 86eacd4..e08b4b1 100755 --- a/hook_shared.sh +++ b/hook_shared.sh @@ -11,6 +11,7 @@ git pull nvm install nvm use npm install +npm run build cd ~/cables/cables_ui git pull diff --git a/hook_standalone.sh b/hook_standalone.sh index af84d44..ee58d9c 100755 --- a/hook_standalone.sh +++ b/hook_standalone.sh @@ -29,7 +29,7 @@ $NPM_EXE install echo "BUILDING shared" cd shared git pull -$NPM_EXE install +$NPM_EXE run build cd .. echo "BUILDING cables" diff --git a/shared/package.json b/shared/package.json index 2e9b44c..aa5b712 100644 --- a/shared/package.json +++ b/shared/package.json @@ -13,6 +13,7 @@ "type": "module", "license": "MIT", "scripts": { + "build": "npm install", "postinstall": "npm --prefix ./api install && npm --prefix ./client install" } } diff --git a/update_live.sh b/update_live.sh index edf1619..1953220 100755 --- a/update_live.sh +++ b/update_live.sh @@ -20,6 +20,17 @@ set -o pipefail # set master branch branch="master" +echo "UPDATING SHARED..." +cd shared + +# ignore errors here, since branch might not be on remote +git checkout master +git pull +nvm install +nvm use +npm install +npm run build +cd .. echo "UPDATING CORE..." cd cables