1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-03-08 13:19:05 +00:00

Fix: Grist update no longer removes previous user data (#2428)

* fix: copy previous user files from /opt/grist_bak

related to issue #2421

* chore: add more logging when running update scripts

they can take a long time, and a user may think its stuck
This commit is contained in:
Carl Furrow 2025-02-16 02:47:59 -05:00 committed by GitHub
parent 53196c7603
commit be27905776
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,18 +34,36 @@ function update_script() {
msg_ok "Stopped ${APP} Service" msg_ok "Stopped ${APP} Service"
msg_info "Updating ${APP} to v${RELEASE}" msg_info "Updating ${APP} to v${RELEASE}"
cd /opt cd /opt
rm -rf grist_bak rm -rf grist_bak
mv grist grist_bak mv grist grist_bak
wget -q https://github.com/gristlabs/grist-core/archive/refs/tags/v${RELEASE}.zip wget -q https://github.com/gristlabs/grist-core/archive/refs/tags/v${RELEASE}.zip
unzip -q v$RELEASE.zip unzip -q v$RELEASE.zip
mv grist-core-${RELEASE} grist mv grist-core-${RELEASE} grist
cp -n /opt/grist_bak/.env /opt/grist/.env
mkdir -p grist/docs
cp -n grist_bak/.env grist/.env || true
cp -r grist_bak/docs/* grist/docs/ || true
cp grist_bak/grist-sessions.db grist/grist-sessions.db || true
cp grist_bak/landing.db grist/landing.db || true
cd grist cd grist
msg_info "Installing Dependencies"
yarn install >/dev/null 2>&1 yarn install >/dev/null 2>&1
msg_ok "Installed Dependencies"
msg_info "Building"
yarn run build:prod >/dev/null 2>&1 yarn run build:prod >/dev/null 2>&1
msg_ok "Done building"
msg_info "Installing Python"
yarn run install:python >/dev/null 2>&1 yarn run install:python >/dev/null 2>&1
msg_ok "Installed Python"
echo "${RELEASE}" >/opt/${APP}_version.txt echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to v${RELEASE}" msg_ok "Updated ${APP} to v${RELEASE}"
msg_info "Starting ${APP} Service" msg_info "Starting ${APP} Service"