msg_info_shown

This commit is contained in:
CanbiZ 2025-06-23 16:20:35 +02:00
parent d1ba76bc88
commit bb91f02598
2 changed files with 8 additions and 4 deletions

View File

@ -447,7 +447,9 @@ msg_ok() {
[[ -z "$msg" ]] && return [[ -z "$msg" ]] && return
stop_spinner stop_spinner
printf "\r\e[2K%s %b\n" "$CM" "${GN}${msg}${CL}" >&2 printf "\r\e[2K%s %b\n" "$CM" "${GN}${msg}${CL}" >&2
unset MSG_INFO_SHOWN["$msg"] if declare -p MSG_INFO_SHOWN &>/dev/null && [[ "$(declare -p MSG_INFO_SHOWN 2>/dev/null)" =~ "declare -A" ]]; then
unset MSG_INFO_SHOWN["$msg"]
fi
} }
msg_error() { msg_error() {
@ -462,7 +464,9 @@ msg_warn() {
[[ -z "$msg" ]] && return [[ -z "$msg" ]] && return
stop_spinner stop_spinner
printf "\r\e[2K%s %b\n" "$INFO" "${YWB}${msg}${CL}" >&2 printf "\r\e[2K%s %b\n" "$INFO" "${YWB}${msg}${CL}" >&2
unset MSG_INFO_SHOWN["$msg"] if declare -p MSG_INFO_SHOWN &>/dev/null && [[ "$(declare -p MSG_INFO_SHOWN 2>/dev/null)" =~ "declare -A" ]]; then
unset MSG_INFO_SHOWN["$msg"]
fi
} }
msg_custom() { msg_custom() {

View File

@ -81,7 +81,7 @@ WantedBy=multi-user.target
EOF EOF
systemctl enable -q --now "$SERVICE" systemctl enable -q --now "$SERVICE"
msg_ok "${APP} installed at http://${IP}" msg_ok "${APP} installed at http://${IP}:24900"
} }
function uninstall_ui() { function uninstall_ui() {
@ -101,7 +101,7 @@ function update_ui() {
NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs
fetch_and_deploy_gh_release "meilisearch-ui" "$REPO" fetch_and_deploy_gh_release "meilisearch-ui" "$REPO"
msg_info "Updating ${APP} to $release" msg_info "Updating ${APP}"
cd /opt/meilisearch-ui cd /opt/meilisearch-ui
sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts
mv /tmp/.env.local.bak /opt/meilisearch-ui/.env.local mv /tmp/.env.local.bak /opt/meilisearch-ui/.env.local