Skip to content

Commit be27905

Browse files
authored
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
1 parent 53196c7 commit be27905

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

ct/grist.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,36 @@ function update_script() {
3434
msg_ok "Stopped ${APP} Service"
3535

3636
msg_info "Updating ${APP} to v${RELEASE}"
37+
3738
cd /opt
3839
rm -rf grist_bak
3940
mv grist grist_bak
4041
wget -q https://github.com/gristlabs/grist-core/archive/refs/tags/v${RELEASE}.zip
4142
unzip -q v$RELEASE.zip
4243
mv grist-core-${RELEASE} grist
43-
cp -n /opt/grist_bak/.env /opt/grist/.env
44+
45+
mkdir -p grist/docs
46+
47+
cp -n grist_bak/.env grist/.env || true
48+
cp -r grist_bak/docs/* grist/docs/ || true
49+
cp grist_bak/grist-sessions.db grist/grist-sessions.db || true
50+
cp grist_bak/landing.db grist/landing.db || true
51+
4452
cd grist
53+
msg_info "Installing Dependencies"
4554
yarn install >/dev/null 2>&1
55+
msg_ok "Installed Dependencies"
56+
57+
msg_info "Building"
4658
yarn run build:prod >/dev/null 2>&1
59+
msg_ok "Done building"
60+
61+
msg_info "Installing Python"
4762
yarn run install:python >/dev/null 2>&1
63+
msg_ok "Installed Python"
64+
4865
echo "${RELEASE}" >/opt/${APP}_version.txt
66+
4967
msg_ok "Updated ${APP} to v${RELEASE}"
5068

5169
msg_info "Starting ${APP} Service"

0 commit comments

Comments
 (0)