Compare commits

..

6 Commits

Author SHA1 Message Date
Jesper Dramsch
4ddac3c1a6 rm newline 2025-01-09 10:58:31 +01:00
Jesper Dramsch
c5d7608a78
Remove old installation (at request of @michelroegl-brunner)
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
2025-01-09 10:54:02 +01:00
Jesper Dramsch
45ccdeef3f
Avoid Workdir
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
2025-01-09 10:51:07 +01:00
Jesper Dramsch
7e766cdf8e
Avoid Workdir
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
2025-01-09 10:50:50 +01:00
Jesper Dramsch
0235b1385b
Workdir
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
2025-01-09 10:50:25 +01:00
Jesper Dramsch
a11c5d86ec
Workdir
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
2025-01-09 10:50:17 +01:00

View File

@ -41,11 +41,10 @@ function update_script() {
msg_ok "Services Stopped"
msg_info "Updating ${APP} to ${RELEASE}"
WORKDIR="$PWD"
mv /opt/adventurelog/ /opt/adventurelog-backup/
wget -q "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip"
unzip -q v${RELEASE}.zip
mv AdventureLog-${RELEASE} /opt/adventurelog
wget -qO /opt/v${RELEASE}.zip "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip"
unzip -q /opt/v${RELEASE}.zip
mv /opt/AdventureLog-${RELEASE} /opt/adventurelog
mv /opt/adventurelog-backup/backend/server/.env /opt/adventurelog/backend/server/.env
mv /opt/adventurelog-backup/backend/server/media /opt/adventurelog/backend/server/media
@ -55,13 +54,11 @@ function update_script() {
python3 manage.py collectstatic --noinput &>/dev/null
python3 manage.py migrate &>/dev/null
mv /opt/adventurelog-backup/frontend/.env /opt/adventurelog/frontend/.env
cd /opt/adventurelog/frontend
pnpm install &>/dev/null
pnpm run build &>/dev/null
echo "${RELEASE}" >/opt/${APP}_version.txt
cd "$WORKDIR"
msg_ok "Updated ${APP}"
msg_info "Starting Services"
@ -70,8 +67,8 @@ function update_script() {
msg_ok "Started Services"
msg_info "Cleaning Up"
rm -rf v${RELEASE}.zip
mv /opt/adventurelog-backup/ adventurelog-backup-$LAST_VERSION/ # Keep backup, since AdventureLog moves quickly and we want to avoid breaking changes with rm -rf
rm -rf /opt/v${RELEASE}.zip
rm -rf /opt/adventurelog-backup
msg_ok "Cleaned"
msg_ok "Updated Successfully"
else