From a2ed41514df40977e435e010af96705f1502111286bae5c85b115276f7e16326 Mon Sep 17 00:00:00 2001 From: AidarKC Date: Fri, 1 May 2026 16:09:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=B5=D0=BF=D0=BB=D0=BE=D0=B9=20UI:=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=8F=D0=B7=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=BF=D0=BE=D0=B4=D1=81=D1=82=D0=B0=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=BA=D0=B0=20client.version=20=D0=B8=D0=B7=20VERSION.pr?= =?UTF-8?q?operties?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION.properties | 4 ++-- deploy_shine-PWA.sh | 32 ++++++++++++++++++-------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/VERSION.properties b/VERSION.properties index b2afadd..5a0de82 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.2.23 -server.version=1.2.23 +client.version=1.2.24 +server.version=1.2.24 diff --git a/deploy_shine-PWA.sh b/deploy_shine-PWA.sh index 5242d07..e41f957 100755 --- a/deploy_shine-PWA.sh +++ b/deploy_shine-PWA.sh @@ -2,20 +2,23 @@ set -euo pipefail SRC_DIR="shine-UI" -REMOTE_HOST="${REMOTE_HOST:-user@194.87.0.247}" -REMOTE_BASE_DIR="${REMOTE_BASE_DIR:-/home/user/docker/caddyFile/sites}" +REMOTE_HOST="${REMOTE_HOST:-player@shineup.me}" +REMOTE_BASE_DIR="${REMOTE_BASE_DIR:-/home/player/SHiNE}" BUILD_VERSION="$(date -u +%Y%m%d%H%M%S)" VERSION_FILE="VERSION.properties" export BUILD_VERSION TMP_DIR="$(mktemp -d)" TARGET="${1:-prod}" -CLIENT_VERSION="dev" -if [[ -f "$VERSION_FILE" ]]; then - CLIENT_VERSION="$(sed -n "s/^client\\.version[[:space:]]*=[[:space:]]*//p" "$VERSION_FILE" | head -n 1 | tr -d '\r' | xargs)" - if [[ -z "$CLIENT_VERSION" ]]; then - CLIENT_VERSION="dev" - fi +if [[ ! -f "$VERSION_FILE" ]]; then + echo "ERROR: version file not found: $VERSION_FILE" >&2 + exit 1 +fi + +CLIENT_VERSION="$(sed -n "s/^client\\.version[[:space:]]*=[[:space:]]*//p" "$VERSION_FILE" | head -n 1 | tr -d '\r' | xargs)" +if [[ -z "$CLIENT_VERSION" ]]; then + echo "ERROR: client.version is empty in $VERSION_FILE" >&2 + exit 1 fi export CLIENT_VERSION @@ -27,27 +30,27 @@ case "$TARGET" in TARGET_URL="https://shineup.me" ;; ui_1|ui-1|1|shine-UI_1) - TARGET_DIR="shine-UI_1" + TARGET_DIR="test-UI/shine-UI_1" TARGET_URL="https://ui-1.shineup.me" ;; ui_2|ui-2|2|shine-UI_2) - TARGET_DIR="shine-UI_2" + TARGET_DIR="test-UI/shine-UI_2" TARGET_URL="https://ui-2.shineup.me" ;; ui_3|ui-3|3|shine-UI_3) - TARGET_DIR="shine-UI_3" + TARGET_DIR="test-UI/shine-UI_3" TARGET_URL="https://ui-3.shineup.me" ;; ui_drygmira|ui-drygmira|drygmira|shine-UI_drygmira) - TARGET_DIR="shine-UI_drygmira" + TARGET_DIR="test-UI/shine-UI_drygmira" TARGET_URL="https://ui-drygmira.shineup.me" ;; ui_milana|ui-milana|milana|shine-UI_milana) - TARGET_DIR="shine-UI_milana" + TARGET_DIR="test-UI/shine-UI_milana" TARGET_URL="https://ui-milana.shineup.me" ;; ui_aidar|ui-aidar|aidar|shine-UI_aidar) - TARGET_DIR="shine-UI_aidar" + TARGET_DIR="test-UI/shine-UI_aidar" TARGET_URL="https://ui-aidar.shineup.me" ;; *) @@ -69,6 +72,7 @@ if [[ ! -d "$SRC_DIR" ]]; then fi echo "==> Preparing staged UI copy with build version: $BUILD_VERSION" +echo "==> Client version from $VERSION_FILE: $CLIENT_VERSION" echo "==> Deploy target: $TARGET_URL ($TARGET_DIR)" rsync -a "$SRC_DIR"/ "$TMP_DIR"/