SHA256
Перевести тестовый контур на t.shineup.me
This commit is contained in:
@@ -26,6 +26,8 @@ export CLIENT_VERSION
|
||||
|
||||
TARGET_URL="${TARGET_URL:-https://${EXPECTED_CADDY_SITE}}"
|
||||
REMOTE_DIR="${REMOTE_UI_DIR}"
|
||||
DEPLOY_SERVER_LOGIN="${DEPLOY_SERVER_LOGIN:-}"
|
||||
DEPLOY_SERVER_ADDRESS="${DEPLOY_SERVER_ADDRESS:-}"
|
||||
|
||||
cleanup() {
|
||||
rm -rf "$TMP_DIR"
|
||||
@@ -42,6 +44,16 @@ echo "==> Client version from $VERSION_FILE: $CLIENT_VERSION"
|
||||
echo "==> Deploy target: $TARGET_URL ($REMOTE_DIR)"
|
||||
rsync -a "$SRC_DIR"/ "$TMP_DIR"/
|
||||
|
||||
DEPLOY_CONFIG_FILE="$TMP_DIR/js/deploy-config.js"
|
||||
if [[ -f "$DEPLOY_CONFIG_FILE" ]]; then
|
||||
if [[ -n "$DEPLOY_SERVER_LOGIN" ]]; then
|
||||
perl -0pi -e "s/export const defaultServerLogin = '.*?';/export const defaultServerLogin = '$DEPLOY_SERVER_LOGIN';/s" "$DEPLOY_CONFIG_FILE"
|
||||
fi
|
||||
if [[ -n "$DEPLOY_SERVER_ADDRESS" ]]; then
|
||||
perl -0pi -e "s/export const defaultServerAddress = '.*?';/export const defaultServerAddress = '$DEPLOY_SERVER_ADDRESS';/s" "$DEPLOY_CONFIG_FILE"
|
||||
fi
|
||||
fi
|
||||
|
||||
INDEX_FILE="$TMP_DIR/index.html"
|
||||
if [[ ! -f "$INDEX_FILE" ]]; then
|
||||
echo "ERROR: index.html not found in staged UI: $INDEX_FILE" >&2
|
||||
|
||||
Reference in New Issue
Block a user