From bac998fc10242fc007ccc00f5a5ae7b412e353c3 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Wed, 4 Jun 2025 08:23:25 -0400 Subject: [PATCH] mmdl: fix release parsing in mmdl.sh --- ct/managemydamnlife.sh | 2 +- install/managemydamnlife-install.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/managemydamnlife.sh b/ct/managemydamnlife.sh index 27d59db5..16cba9eb 100644 --- a/ct/managemydamnlife.sh +++ b/ct/managemydamnlife.sh @@ -29,7 +29,7 @@ function update_script() { exit fi - RELEASE=$(curl -s https://api.github.com/repos/intri-in/manage-my-damn-life-nextjs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + RELEASE=$(curl -s https://api.github.com/repos/intri-in/manage-my-damn-life-nextjs/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ "${RELEASE}" != "$(cat /opt/mmdl_version.txt)" ]] || [[ ! -f /opt/mmdl_version.txt ]]; then msg_info "Stopping $APP" systemctl stop mmdl diff --git a/install/managemydamnlife-install.sh b/install/managemydamnlife-install.sh index ef61764e..a7f219e6 100644 --- a/install/managemydamnlife-install.sh +++ b/install/managemydamnlife-install.sh @@ -34,7 +34,7 @@ $STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH } >>~/mmdl.creds msg_ok "Set up Database" -msg_info "Setup ${APPLICATION}" +msg_info "Installing ${APPLICATION}" RELEASE=$(curl -s https://api.github.com/repos/intri-in/manage-my-damn-life-nextjs/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSLO "https://github.com/intri-in/manage-my-damn-life-nextjs/archive/refs/tags/v${RELEASE}.zip" unzip -q v"$RELEASE".zip @@ -57,7 +57,7 @@ $STD npm install $STD npm run migrate $STD npm run build echo "${RELEASE}" >/opt/mmdl_version.txt -msg_ok "Setup ${APPLICATION}" +msg_ok "Installed ${APPLICATION}" msg_info "Creating Service" cat </etc/systemd/system/mmdl.service