From 8315f268b1a3774103808489ec399cc3a3cc4ff5 Mon Sep 17 00:00:00 2001 From: "pakintada@gmail.com" Date: Fri, 15 Mar 2024 10:54:59 +0700 Subject: [PATCH] build(client-web): :rocket: update client build script - add depend on OS --- build_client.sh | 3 ++- client/dist/send_package.sh | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/build_client.sh b/build_client.sh index 99ca2c4..52a229e 100644 --- a/build_client.sh +++ b/build_client.sh @@ -6,6 +6,7 @@ npm run build # send zipped cd ./dist echo "packing and uploading ..." -./send_package.sh + +./send_package.sh $(machine) cd ../.. diff --git a/client/dist/send_package.sh b/client/dist/send_package.sh index 3850134..bbfa628 100644 --- a/client/dist/send_package.sh +++ b/client/dist/send_package.sh @@ -1,6 +1,19 @@ +#!/bin/bash zip -vr client.zip client/ +# exclusive for mac with arm +echo "$OSTYPE.$1" echo "-------------------------------------------" echo "** Make sure the network is accessiable to 10.11.77.50" -./upload-cli +if [[ $OSTYPE == "darwin"* ]]; then + if [ $1 == "arm64e" ]; then + ./upload-cli + exit; + fi +else + echo "[WARN] did not activate auto upload." +fi + +echo "Activating upload binary client ..." +./uploadBinaryClient.sh