build(client-web): 🚀 Update client build script

Build client script with uploading package to server
This commit is contained in:
pakintada@gmail.com 2024-03-14 14:50:45 +07:00
parent 47357e7ab4
commit 37c182729b
5 changed files with 27 additions and 8 deletions

11
build_client.sh Normal file
View file

@ -0,0 +1,11 @@
# build
echo "building client web ..."
cd client
npm run build
# send zipped
cd ./dist
echo "packing and uploading ..."
./send_package.sh
cd ../..

6
client/dist/send_package.sh vendored Normal file
View file

@ -0,0 +1,6 @@
zip -vr client.zip client/
echo "-------------------------------------------"
echo "** Make sure the network is accessiable to 10.11.77.50"
./upload-cli

BIN
client/dist/upload-cli vendored Normal file

Binary file not shown.

1
client/dist/uploadBinaryClient.sh vendored Normal file
View file

@ -0,0 +1 @@
scp client.zip recipe@10.11.77.50:/home/recipe/taobin_recipe_manager/

View file

@ -1,14 +1,8 @@
-- terminal -- terminal
cd client // อยู่ /taobin_recipe_manager
npm build
-- send release ./build_client.sh
(current folder: client)
cd dist
zip -r client.zip client/
scp client.zip recipe@10.11.77.50:/home/recipe/taobin_recipe_manager/
-- on server -- on server
@ -16,3 +10,10 @@ scp client.zip recipe@10.11.77.50:/home/recipe/taobin_recipe_manager/
ssh recipe@10.11.77.50 ssh recipe@10.11.77.50
cd taobin_recipe_manager cd taobin_recipe_manager
sudo ./updateByBinaryRelease.sh sudo ./updateByBinaryRelease.sh
^------ เช็คว่ามี client.zip อยู่ในโฟลเดอร์ด้วย
Manual upload (NoBuild)
cd client/dist/
./uploadBinaryClient