Update paymenter.sh

Add line to update version file
This commit is contained in:
Nícolas Pastorello 2025-01-28 15:48:05 -03:00 committed by GitHub
parent d2b2ffa3d5
commit 5ccff2a5b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,6 +36,7 @@ function update_script() {
RELEASE=$(curl -s https://api.github.com/repos/paymenter/paymenter/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Updating ${APP} to ${RELEASE}"
echo "${RELEASE}" >/opt/${APP}_version.txt
cd /opt/paymenter
php artisan p:upgrade --no-interaction &>/dev/null
msg_ok "Updated Successfully"