Apply suggestions from code review

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>
This commit is contained in:
vhsdream 2024-11-29 08:12:40 -05:00 committed by GitHub
parent 993c7e83ad
commit ccf08e78ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,13 +72,14 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "${PREV_RELEASE}" ]]
mv hoarder-${RELEASE} /opt/hoarder mv hoarder-${RELEASE} /opt/hoarder
cd /opt/hoarder/apps/web cd /opt/hoarder/apps/web
pnpm install --frozen-lockfile &>/dev/null pnpm install --frozen-lockfile &>/dev/null
pnpm exec next build --experimental-build-mode compile >/dev/null 2>&1 pnpm exec next build --experimental-build-mode compile &>/dev/null
cp -r /opt/hoarder/apps/web/.next/standalone/apps/web/server.js /opt/hoarder/apps/web cp -r /opt/hoarder/apps/web/.next/standalone/apps/web/server.js /opt/hoarder/apps/web
cd /opt/hoarder/apps/workers cd /opt/hoarder/apps/workers
pnpm install --frozen-lockfile >/dev/null 2>&1 pnpm install --frozen-lockfile >/dev/null 2>&1
mv /opt/.env /opt/hoarder/.env mv /opt/.env /opt/hoarder/.env
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /opt/hoarder/.env sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /opt/hoarder/.env
msg_ok "Updated ${APP} to ${RELEASE}" msg_ok "Updated ${APP} to v${RELEASE}"
msg_info "Starting Services" msg_info "Starting Services"
systemctl start hoarder-browser hoarder-workers hoarder-web systemctl start hoarder-browser hoarder-workers hoarder-web
msg_ok "Started Services" msg_ok "Started Services"