Update Gitea script to display the correct application name and version during the update process

This commit is contained in:
Miguel Muniz 2024-07-22 11:43:06 -07:00
parent fc15af5693
commit 6991f3fd97
7 changed files with 536 additions and 2 deletions

View file

@ -65,7 +65,7 @@ header_info
if [[ ! -f /lib/systemd/system/gitea.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
VERSION=${RELEASE#v}
msg_info "Updating ${APP}"
msg_info "Updating Gitea to ${RELEASE}"
wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
systemctl stop gitea
rm -rf /usr/local/bin/gitea
@ -73,7 +73,7 @@ mv gitea* /usr/local/bin/gitea
systemctl start gitea
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/nullexit
msg_ok "Updated ${APP} to ${RELEASE}"
msg_ok "Updated Gitea to ${RELEASE}"
# else
# msg_ok "No update required ${APP} is already at ${RELEASE}"
# fi